Sometimes when you find nearest point and push player at its level, it can still be inside some other wall, especially when it comes to corners. Normally it finishes the loop on 1 or 2 rounds at max (maybe 4 times in worst case, of hitting cubic room bottom or top corner), but it just does the collision work looped, so that it doesn't have to do that on next frame. It makes the collision look much smoother.