Most modern cars automatically lock when you walk like 3 metres away from the car with keyfob. At least I assume it's most cars.
However there are some edge cases where these systems do not always lock when walking away, if you're opening other doors, the trunk, etc.
Not a good assumption from what I've experienced. It seems quite the opposite to me. Even limiting it to the past decade of model year most cars I've driven do not do this, only a few do.