This glitch relies on an interaction between the broken ladder glitch (the bottom half of the retractable ladders on pies is a broken ladder) and the retractable ladder (top half of the retractable ladders).
I still haven't pieced together exactly what the mechanism is but it seems to have something to do with using the broken ladder glitch to shift Jumpman's position, probably while the retractable ladder also shifts Jumpman's position, which then interferes with Jumpman's ladder dismount code (which relies on Jumpman's ladder climb animation cycles lining up with the tops and bottoms of ladders). If Jumpman's Y position and climb cycle don't align with the Y positions of the ends of the ladders it misses detecting when he has reached the end of a ladder and doesn't dismount.
It doesn't seem like this glitch would work without the retractable ladder, so it'll only work on Pies.