There were times when you had to be cruel to your subordinates and this was one of the moments for Amir to do so.
There was someone who had dared to come so close and drop a dead rat in front of his locker. Not to mention, there was a high chance, it was that very person who cried about murder before disappearing altogether, directly under the watch of countless transcendent beings.
A sign that this individual was capable of much more than he just showed them.
As for the guard who suffered the consequences due to it, Amir considered giving the punishment would be much better than him being sent to a tribunal and facing military punishment which would have been way worse than his own.
It was his way of saving the innocent guy.
"This place is not safe Prince, it's better to leave the premises."