It makes me wonder about cats wanting to go out and then immediately wanting to go in.
Like, if you're a relatively small animal, it can be dangerous outside. There are predators, and you have to watch your back. I can imagine it being somewhat stressful to have to wait for a human to let you back in, rather than having immediate access to the safety of the house.