As a dance, it is a euphemism for "move your body." The way the body moves is like a twist.
About baking cakes, it could be referring to putting icing on the cake (adding different layers). The icing is in a twist. It can also mean "do something creative." Think about twisting something together. You need two different elements. When you "twist" something together, you create something new out of two different things.