The origin of walking under the ladder superstition has a number of theories. However, the most relevant and popular one comes from the early days of Christianity, which is based on Trinity. Trinity is the belief that God is made of three parts; the Holy Father, The Holy Son and the Holy Spirit. Together they form a triangle, which is deemed sacred since the three sides represent those three constituents in Christianity.
A ladder leaning up against a wall also forms a triangle, which people traditionally saw as symbolizing the triangle of Trinity. If someone goes within the triangle or even walks under a ladder, this breaks the Trinity and was regarded as in the league of devil, committing an unforgivable sin against the Holy Spirits. As a punishment of this deed, people would be punished by future accidents or bad luck. This is how the myth of walking under the ladder rolled out throughout the globe.