If we ignore the practical safety issues, why is it considered unlucky to walk under a ladder?
Richard Webster addresses this well-known superstition in The Encyclopedia of Superstitions and gives three theories for its origin:
Walking under a ladder is believed to cause bad luck. No one really knows why, but at least three theories have been proposed. The most likely theory is that a ladder forms a triangle when placed against a wall. The triangle symbolizes the Holy Trinity. Consequently, when you walk through it, you effectively insult the Trinity and attract the devil. The second theory concerns the use of a ladder in hangings. The ladder would be propped against a beam to allow the person about to be hanged to climb high enough to reach the rope. A third theory dates back to ancient Egyptian times, when people believed you might see a god walking up or down the ladder while you walked under it.
Webster, R. (2008). The encyclopedia of superstitions. Woodbury, Minn.: Llewellyn Publications.
A version of the hangings theory can also be found in the much older Encyclopaedia of Superstitions, Folklore and the Occult Sciences of the World:
The reason why it is believed to be unlucky to pass under a ladder, is because, in old times, convicts who were condemned to death were made to pass under a ladder; while those who were not condemned to death passed outside.
Daniels, C. (1903). Encyclopaedia of superstitions, folklore, and the occult sciences of the world.