A task that is "like eating a piece of cake" is a task that is easy. Cake, while fattening, is easy to digest. Therefore, doing a task like eating cake, is a task that is easy. Thus, the idiom, "a piece of cake," was born. Ex.: "Driving a car? That's a piece of cake! Flying a plane? Now that's challenging." Something that is a figurative piece of cake, is easy.