Without actually talking to the cat, there's not any way of knowing that they don't perceive walls within some abstraction like "building." All we can really say is that the cat behaves as if the wall is some unchangeable object in its environment. You can't know the mind of a cat. Maybe they just like the idea of being inside something impregnable?