What does "piece of cake" mean — and why is it funny?

informal

Meaning

Something very easy to do.

Where it comes from

Popularized in 1930s America; one source is the 'cakewalk', a contest where the prize was a cake, which made 'cake' a byword for an easy win.

Why it is funny

The fun is in how unrelated cake is to whatever task you mean. Fixing a tire has nothing to do with dessert, yet the phrase swaps in something pleasant and trivial. It makes the hard thing sound delicious and effortless, and that cheerful mismatch is the humor.

Used in a sentence

"The exam? Piece of cake — I was done in twenty minutes."