My cats always try to get out of the house when I go out or come home. Usually I don't let them out but once in a while I let them have a stroll in the corridor. Same as your cat they will sniff at every door on the corridor. But they will be so scare and rush home as soon as there is any noise.
There is a neighbour where my boy specifically love to sniff at I guess becoz he thinks he heard some "meow" from that house during the day and he want to communicate with the cat in there.