Here's why:
* Imperative sentences give a command or make a request.
* "Shut up" directly commands the listener to stop talking.
It's important to note that while grammatically correct, "Shut up" is considered very rude and should be avoided in most situations.