It's probably not a walk, and it probably doesn't involve cake, for a start.
A cakewalk may have developed from the dances of the Seminole Native Americans, it may have developed as American slaves copied and made fun of the airs and graces of their owners, or it may even have started with women competing at being the most elegant and efficient at carrying buckets of water on their heads.
The cakewalk, however it started, gradually became more exuberant (cakewalks were often performed in competition, and yes, sometimes the prize was a cake) and eventually quite athletic. It moved away from the slave quarters and went, taking its habanera rhythm with it, onto the stage.
And as it did the old accompaniment of banjo and fiddle changed to piano and then even to orchestra.
In the end everyone was cakewalking:
So: was this an example of black people mocking white people and then leading on the white people to mock themselves?
Perhaps: but while the cakewalk led to so much happiness all round, to so much joy and ingenuity (improvisation was vital to the cakewalk), such a sharing of cultures, then it's hard to see that it mattered all that much.
Word To Use Today: cakewalk. This dance started off as a dignified walk and sometimes the prize for the best walk was, indeed, a cake. Cakewalk meaning an easy task came from when the cakewalk was indeed a walk, and not the high-stepping dance it became.