Why is "marshmallow" and "cotton candy" both 棉花糖? I just noticed in Google Translate, "marshmallow" becomes 棉花糖. But I thought 棉花糖 was cotton candy. Does 棉花糖 refer to both? That seems strange. How can two different things be called by the same name? Can anyone explain?

Is there another word for "marshmallow"? Another translation I saw is 棉花軟糖.
Yes, 棉花糖 refers to both marshmallow and cotton candy.

Marshmallow is like a cotton boll or a cotton pad while cotton candy is like a loosen cotton boll. Both are cotton-like candies.

It is nothing new that a name refers to two things. People name novelties with their first impression.

It is a very common phenomenon. Look up the definitions of "recorder" in a dictionary. It refers to an recording apparatus, a wind music instrument, and a person who keep record.

棉花軟糖 is a name seldomly used. People use 棉花糖 exclusively in daily life. So do marketers. Marshmallow is a kind of very common commodity while cotton candy not. In daily conversation, if you mention 棉花糖 with no particular scenes or hints, people will recall marshmallow first.