From Xroads:
Its origins in slavery and the plantation south, the Cakewalk was the sole organized and even condoned forum for servants to mock their masters. A send-up of the rich folks in the “Big House,” the cakewalk mocked the aristocratic and grandiose mannerisms of southern high-society. Much bowing and bending were characteristic of the dance, which was more a performance than anything else. Couples lined up to form an aisle, down which each pair would take a turn at a high-stepping promenade through the others. In many instances the Cakewalk was performance, and even competition. The dance would be held at the master’s house on the plantation and he would serve as judge. The dance’s name comes from the cake that would be awarded to the winning couple.
Carnival in full effect, the cakewalk festivities turned convention on its head. The time of the dance was one in which typical order was set aside. Lowly slaves and servants were encouraged to mock the masters to whom obedience was mandated at all other times. The dancers donned fine clothes and adopted high-toned manners, and for the length of the performance they were not slaves but the stars of the show, their racial and social standing transcended. As much as the cakewalk managed to overcome these barriers temporarily, however, it reinforced them the rest of the time. Because the dance was generally sponsored and judged by the plantation owner, he became master of ceremonies, and became master of the joke as well. If the master is in on the jokes that mock him, then the jokes no longer harm his standing with the slaves. So it was with the cakewalk, which further reinforced the master’s authority in allowing him to name a winner and thus make even his symbolic overthrow an attempt to appease him and an act of his decree.
More here. (Note: At least one daily post throughout February will be devoted to African American History Month)