Why was someone whipped in front of the emperor when he was in the palace?

Static whip, police tools, driving equipment and guards. Ring the bell to show silence during the meeting. Also known as whipping.

In front of the Hall of Supreme Harmony, stoves, pots, turtles and cranes spit out plumes of cigarettes; Admiralty and jade Qing, the music is crisp and pleasant. Going up and down in a single stroke, the ministers knelt down. The emperor sat on the golden throne, assumed a dignified posture, stopped "playing music in harmony", and the princes, nobles and officials stood up and stood upright. Luan Yiwei, a captain, sounded the "static whip" three times in the courtyard of the Queen Mother's Palace. This whip, which is more than ten meters long, has a handle about thirty centimeters long and is engraved with a faucet. A captain who plays the whip is well trained and wields the whip freely, and is full of "I dance and practice".

I hope I can help you!