Question: Why does Alice dance briefly at the end after returning to the regular world?
Chosen answer: She is proving a point that she is not going to follow the boundaries of English society, the Mad Hatter futer-wagoned, that was where she got the moves. It also showed the crowd that she wasn't wearing stockings.
Answer: It could be time moves differently in Wonderland, than in the real world. In many time machine movies, the Hero goes off on his adventures, then returns as if no time has passed.