This is a bit bizarre. We know cats are inquisitive but for a cat to end up trapped upside down in a narrow gap between two buildings is strange to say the least.
Also, you’d have thought that he could have been rescued by reaching in and pushing him towards the position where the photographer is. The fire service rescued “Marv” by chopping a hole in the garage wall from the inside at a point just behind him and them dragged him through that hole.
Marv’s owners said he “likes to get into things”! This is the smallest space he has got into. My guess is he went into the gap tried to back up and got stuck and in his wriggling and panic ended up upside down.