There are many other ways to tell someone to be quiet, but for some reason this phrase has a lot of power behind it.
Being told to shut up is offensive to a lot of people. It can spark anger, even if it's said in a joking way. Anger is obviously not something that you want to have in your classroom if you can help it.
It's not like saying shut up is necessary for anything. Do yourself a favor and eliminate it from your classroom, joking or not. That means you too.