Why don’t the king’s guards attack the king?
The police know their job is to enforce the law, but they also know who gets a free pass… or at least who gets a lot more leeway than other people. At a minimum it changes “shoot first and ask questions later” into “ask questions then maybe shoot”.