The car shouldn't let you lock it when a door is still open...
That needs to be fixed...

I've been critical of this in the past as well. Also don't like the idea of being able to open hatch, put my shopping inside and accidently leave the keys inside the hatch, shut the hatch and "oops", the thing is locked.
However, there is a positive to the locking when a door is open. Consider this: I get to work, open the car, including the rear door. Then I close the front door, lock the car, shove the keys in my pocket, get my work stuff off the back seat and slam the rear door shut. This saves me fiddling for my keys to lock the car with my arms full.
Bob