That’s a very interesting question. The “melon” part of the name arises from the fact that one of these looks very much like one of these. And in fact contrary to my original impression, the name has little if anything to do with the flavor. It seems that flavoring melon pan with real melon or melon extract, while it does happen, is a fairly recent development in the history of melon pan. Originally the cookie layer was simply flavored with vanilla.
As far the “pan” part, well, that’s a loanword from Europe to Japan. Ah yes, you might think, it springs in some way from the French word for bread, pain, or possibly the Spanish pan. Both are good guesses, but in fact the word actually derives from the Portuguese word for bread, pão which is also pronounced “pan.”
I know what you’re thinking: how in the world did a Portuguese word come to be introduced to the Japanese language? It’s because the Portuguese were the first Westerners to establish themselves in Japan during the Age of Exploration. Though most of us in the New World tend to think about Spain and England when we consider that period, it’s important to remember that Portugal was the dominant naval power well before either of those two cultures got into the discovery business.
The Portuguese started their maritime investigations of northern Africa all the way back in 1418, and it wasn’t long before explorers like Henry the Navigator were crawling up and down the entire length of Africa’s Atlantic coast. By the 1500’s the Portuguese were traveling the globe in search of lucrative new trading opportunities. One fortuitous day in 1543 a shipload of traders were blown off course and shipwrecked on an island off the southern coast of Japan. The warlord there took a shine to their fancy European firearms, and in no time a brisk trade developed.
As was the style in those days, trade was followed by the arrival of missionaries and in short order the whole area was rife with Christianity and novel Western ideas. To explain the non-Japanese concepts that the Jesuits were introducing, a lot of non-Japanese words had to be used — thousands of them. And they stuck. By some counts there are currently over 30,000 Japanese words that have Portuguese roots. “Bread” is one of them.