Many cars have the keyfob integrated with the key, so if the key is in the car, so is the fob.
I was sitting in my Focus recently waiting for my wife. The inition was off (but key in lock) and the doors closed.
Suddenly, all the doors locked without warning.
I hadn't realised that security 'feature' existed up until then. Fortunately I found out when I was on the same side of the doors as the key!