Shakespeare lived and worked through the reign of two monarchs, Queen Elizabeth I and King James I of England (who was also King James VI of Scotland). This was generally a time of relative stability in England, but violent upheaval and disorder were never far from the surface. Even after the defeat of the Spanish Armada in 1588—arguably Elizabeth's finest hour as monarch—the queen was never completely secure on the throne. As for her successor, James came within an ace of being blown to pieces, along with the entire English political establishment, as a result of the notorious Gunpowder Plot of 1605, just two years after he ascended to the throne.
It's notable that in a number of his plays, Shakespeare effectively warns his fellow countrymen of the dangers involved in a violent handover of power. Macbeth is probably the classic example of this. In Shakespeare's world, assassinating a sitting ruler isn't just wrong; it's positively diabolical. Macbeth actively conspires with the forces of darkness in murdering King Duncan, and it's clear that Shakespeare regards any would-be usurper or assassin as having entered into a similarly Satanic pact.