Walking under a ladder is almost universally considered to be bad luck. The superstition is thought to be based on the ancient Egyptian practice of leaving ladders in tombs so that the dead could ascend upwards if they wanted. Egyptians believed that the triangular space between the ladder, the floor and the wall was filled with good and evil spirits, and that they should not be disturbed. It was therefore, forbidden to walk underneath any leaning ladder for fear of disturbing the spirits and incurring their wrath. We know the triangular shape created by a ladder leaning against a wall was sacred to ancient Egyptians - we can see it in the pyramids - but the triangle is also sacred to Christians as it represents the Holy Trinity.
In the Middle Ages, under Christianity it was considered bad luck to walk under a ladder as it broke the Holy Trinity, supposedly inviting the devil into your life. Later on, the shape was associated with the gallows, where walking under a ladder was said to be inviting your own death. Whatever the reason, walking under a ladder has been considered to be bad luck throughout human history; It’s such an enduring superstition that people have stuck to it, adapting and changing the reasons why as society changes. There have been various ways of breaking the bad luck curse if you are forced to step under a ladder for any reason, including walking backwards under the ladder and crossing your fingers until you see a dog; Spitting three times was a popular penance in medieval times, and ancient Egyptians had to put their thumb between their index and middle finger if walking under a ladder was unavoidable. Nowadays some people even prefer to believe that you can make a wish if you have to walk under a ladder, putting a more optimistic spin on this superstition.
Whether you believe in this superstition or not (and around 1 in 6 of British people still do) it's not a bad habit to keep, as it can turn out badly in real life. If there is someone up the ladder they could drop something or, in the worst case scenario, fall off the ladder and land on you. There's a chance that someone could be descending the ladder as you pass underneath, kicking you in the head as they come down, and if you're glued to your phone, not paying attention to where you are going, you could hit your head on it. Stumbling into the ladder could send it crashing to the ground, bringing down whoever is unlucky enough to be on it at the time. In a sense, walking under a ladder can bring bad luck even if it's nothing to do with the original superstitions, but as a direct consequence of the action. We're not sure that crossing your fingers until you see a dog will sort out a concussion though, so stay on the safe side and avoid walking around or under ladders.