This is normal. The move you used, Whirlwind, has -6 priority and thus will almost always move last. The only time you will move first using Whirlwind is if your opponent also used a move that is in the -6 priority bracket and your Pokemon was faster, or if you opponent used Trick Room which has -7 priority. Body Slam has 0 priority, so it will always move before Whirlwind.
Whirlwind has negative priority to prevent the use of the same strategy you seem to be describing. It would be ridiculous and absolutely game-breaking if Pokemon could max out their speed and control the game by repeatedly clicking Whirlwind until the ideal Pokemon is forced in. With entry hazards, you could win the game simply clicking one button over and over. The same rule applies to Circle Throw, Dragon Tail and Roar which are also phasing moves and have -6 priority.