Humans are innately curious creatures. We like to figure out the whys and hows of things. It's our way of making sense of the world around us. But there are often cases where we don't have enough evidence to tie up all of our loose ends. Instead of leaving questions unanswered, we simply make up a plausible solution.
When we create a history for our words and phrases that may not be accurate, that history is called a folk etymology. And our idiom, "piece of cake," is a perfect example, since uncovering its true origins is anything but easy.

Piece of Cake or a Cakewalk?
If you Google the history of the phrase "piece of cake," many sources will say that it's most likely derived from the similar phrase for something easy, "cakewalk." If a task is simple and easy to complete, it's a piece of cake or a cakewalk. Some other related phrases we use are "easy as pie" or "a walk in the park."
So, what is a cakewalk, and why do we relate it to something easy? A modern cakewalk is a game similar to musical chairs, where people walk around in a circle to music and stand on numbered spots on the floor. When the music stops, a number is called, and the person on that number wins a cake. These are usually done as fundraisers, and multiple cakes are brought in as prizes. It's a very simple way to win a cake.
History of Cakewalks
Historically, a cakewalk was a dance popularized by African Americans during the Reconstruction Era. A cakewalk was said to be performed even earlier by enslaved people as a way of mocking the white slave owners. The enslaved would dress up and over-emphasize grandiose promenades, and the best performance was awarded a prize of cake.
The problem we run into with this history is that we have no firsthand accounts of it happening. There are only stories passed down of what the original cakewalks were and why they were performed. Some historians say the enslaved people were the ones to develop the cakewalk, while others believe the slave owners invented it and then the enslaved made it their own.
Another issue with this uncertain historical account is that if cakewalks were originally a competition, how did the phrases “cakewalk” and “piece of cake” come to mean something easy? Dancing the cakewalk was far from simple—it was a skilled performance that became popular throughout America and Europe and even served as a precursor to ragtime. This raises an important question: if the dance wasn’t easy at all, can it really explain the origin of “piece of cake”?

British Idiom?
A cakewalk was a uniquely American thing, which spread to other countries later. Then, why do we have "piece of cake" being used in England more regularly than in the US? The first written instance of "piece of cake" is in Ogden Nash's 1936 book, Primrose Path. Nash was American, but only the British edition of his book includes the line, "Her picture's in the paper now, And life's a piece of cake."
Nash's American version of the poem reads as "Her picture's in the paper now, And everything is jake." This phrase, meaning that everything was fine, was confusing to British readers, and so it was changed to the "piece of cake" line. If the British were using this idiom, then the theory that "piece of cake" comes from American cakewalks seems to fall apart.
We have records of the British Royal Air Force using “piece of cake” during World War II to describe an easy target or a simple mission. But earlier historical records of the phrase in British usage are scarce, and attempts to trace it further tend to come up empty.

The Cake is a Lie
There just aren't enough records to know for sure how "piece of cake" came to mean something easy. It could certainly be referring to cakewalks. Maybe the phrase "cakewalk" morphed into "piece of cake" when Europe began adopting the dance move. Maybe "piece of cake" has nothing to do with cakewalks, and we just related them through sheer force of will to find meaning behind the phrase.
We may never know the true history behind "piece of cake," but that doesn't mean our folk etymology is meaningless. Finding patterns and links in languages and history is one of the things that makes us human, and there's value in our theories as they keep us thinking critically about our world.
