In classical times, it was illegal to die on the sacred isle of Delos. It was also illegal to give birth there.
Delos was the birthplace of two gods: Apollo and Artemis. That made the tiny island incredibly holy.
There had been a sacred sanctuary on Delos since Minoan times. There had also been a village of priests and priestesses who served the temples. The priestly village was on the coast right next to the sanctuary, which was natural enough. That made it a short walk to work.
But then some time around 540BC, something interesting happened. The Athenians, who supported Delos with gifts and supplies, took it into their heads to remove all the dead people from around the sanctuary. Nobody knows exactly why they decided to do this, but it's too weird to have been anything other than an oracle received, either from Delphi or maybe from Delos itself.
Either way, the Athenians turned up at Delos en masse. They dug up every body in the village cemetery and relocated the corpses to a new cemetery on the other side of the island. (This must have been fun.)
Then they dismantled the village and relocated it to the other side of the island too.
This was a catharsis. We use catharsis for plays and books, but the original meaning was ritual purification.
From that moment on, it seems, it was illegal to die or be born on Delos. Fortunately the much larger island of Mykonos was not far off, so if you felt one event or the other coming on, then you could be ferried off the island. For emergencies there was an even smaller islet called Rhenia, so close by you could almost wade there.
You're probably wondering what the penalty was for dying, and so am I. Presumably things couldn't get much worse for you anyway. Alas we'll never know.
But we're not done yet. In 426BC, the Athenians decided their ancestors of a hundred years ago hadn't done a good enough job. They returned to Delos, dug up the bodies from the new cemetery, and carried them off the island completely.
At that point there was not a single corpse left on the island (except for the two Hyperborean women), and this odd game of move-the-bodies ended. Delos remained ritually pure until after the death of Alexander, when people became less fussed about such things, and a thriving community moved in.