Not sure about all keyless cars but ours works as follows - you walk up to it and door is opened by anyone, providing keyholder is in close enough proximity, same goes for starting car, if key is inside car itself, press button and it starts,
If I walk away with key, it self locks after a short amount of time, and anyone walking up to it cannot open it if I am far enough away - not tested for distance but cant be more that a few metres at most.
If i walked from parking space to shops and key had been lost in shops, i wouldnt be able to open, or start, the car.
If key is in immediate vicinty of car when you returned, you would be able to unlock and start it, to drive it away. If key had fallen under the car, this could have enabled you to drive it away but would either remain unlocked, or self lock when you arrived at next destination?
Or alternatively you may have had too many pockets/bags and inadvertently still had the key, so letting you open and start car to drive away?