A ladder against a smooth wall is held up by one thing: friction at its foot. The higher you climb, the harder the wall has to push back to keep the ladder from rotating, and the floor's friction has to match that push. Friction has a ceiling, μs times the floor's normal force, so there's a height where it runs out and the foot kicks out.