If you're an idiot, your head is like a ring doughnut - it has a big empty space in the middle i.e. where the brain should be.
That's the analogy I assumed gave rise to the insult.
Or could be because dough is dense; 'dense' and 'thick' are two insults in British English used to mean stupid. Plus, nut is a colloquialism meaning head. Doughnut; thick in the head.
All just speculation on my part, I'm afraid.
Probably the often cited relation of the origin of the expression piece of cake with cakewalk is only incidental. As suggested in the following extract from The Grammerphobia the idea of cake as something pleasant and easy (to swallow) dates back at least to the 16th century. Piece of cake may be just a later version along those lines:
The Oxford English Dictionary doesn’t comment on the difficulties of cake-making, but it agrees with you that the colloquial phrase “a piece of cake” refers to “something easy or pleasant.”
How did cake get this reputation?
As the OED explains, cake is associated figuratively, especially by children, “as a ‘good thing,’ the dainty, delicacy, or ‘sweets’ of a repast.”
Cake comes off as highly rated in other phrases as well.
The expression “you can’t have your cake [that is, keep your cake] and eat it too” dates back, in various forms, to the 1500s.
- Here’s its earliest incarnation, from John Heywood’s Proverbs and Epigrams (1562): “Wolde ye bothe eate your cake, and haue your cake?”
The phrases “cakes and ale” (in England) and “cake and cheese” (in Scotland) have been used since the early 1600s as metaphors for the good things in life.
Similarly, the 19th-century American expression “*to take the cake” means “to carry off the honours, rank first,” the OED says, adding that it’s “often used ironically or as an expression of surprise.”
And of course, any extra trimmings in the way of good luck will inevitably be described as “the icing on the cake” (1969).
“a piece of cake.” The OED’s first citation comes from a collection of light verse by Ogden Nash, The Primrose Path (1935): “Her picture’s in the papers now, / And life’s a piece of cake.”
The AHD has a different suggestion, as you noted, as to its origin, but both sources see its earliest usages from the ‘30s. I’d point out that the supporting idea is the same:
Possibly it evokes the easy accomplishment of swallowing a slice of sweet dessert.
2) Is there an earlier citation than 1936?
Note that the Primrose Path was published in 1935, not in 1936 as a number of sites suggest:
3) Is the idiom “piece of cake” American or British?
The sites The Babbel Blog, Smartling and mainly Not one-off Britishism classify “a piece of cake” as an AmE idiom.
“a piece of cake” is as American as red velvet cake.”
Best Answer
After reading the article available here, I have come to understand that the phrase on the way has actually come from the nautical term - way rather than the 'way' as in lane or roadway.
Quoting the article,
Thus, even though we mean that we are approaching something when we say that we are on the way, yet the origin of this phrase is from the nautical word.