When you say something is a "piece of cake," it means it is very easy to do.
In the 19th and early 20th centuries, African Americans started "cake walks." They walked or danced around a cake in pairs, and the best couple won the cake. This is how the idioms "cake walk" and "piece of cake" came about -- both meaning that something is very easy to do.
A: Hey! How did you do on the exam?
B: I got an A. The exam was a piece of cake.
When something is exceptionally easy. Originated from slaves doing a dance called "cakewalking," a dance to imitateballroom dancing, made to look effortless. Slave owners would sometimes reward the best performer with a piece of hoecake.
Dude 1: All right, I need to farm 25K honor today.
Dude 2: Piece of cake.
Dude 1: Huh?
Dude 2: We allways cap 3 flags before the first 7 minutes (World of Warcraft).