Kings and queens have often put themselves above the law, or simply rewritten the laws according to their desires.
They had many ways to eliminate people who bothered or threatened them. The lucky ones wound up in prisons or insane asylums, but the others ended up dead.