But how the fuck does a cat learn this behavior? What kind of owner repeatedly lets their cat wander freely and basically say "find your own fucking way back to the fourth floor"?
My best friend's building doesn't have an elevator, but we let one of the neighbour's cats in all the time. There is a hole in the screen in their kitchen window and he gets out a lot. He loiters around outside until someone will let him in. You have to let him into the stair well and follow him upstairs, and give their door a knock.
If they aren't home he'll wait around inside for a while, then get bored and come cry at doors one at a time until he finds someone willing to go back downstairs and let him back out.
It may seem silly, but he lives there too and he needs help so we give it to him.