In prehistoric times, executions of condemned prisoners were carried out as sacrificial ceremonies to the rising sun.
In the Middle Ages, because the executions were public, they continued to be held early in the day so as not to attract huge crowds.
It wasn’t until well into the twentieth century that more enlightened societies brought capital punishment indoors, not because executions were shocking, but because they were too popular.