my car does that too....if the key is in the ignition (and turned on) if i get out the car and let the door close im locked out...now if i have my windows down it never seems to do it naturally
actually i thought it was part of the design...to lock the doors automatically when the key is on or the engine running....
i got locked out twice...once trying to take my g/friend to work one morning...was wiping off the windows and let the door close...with the engine running...she was trapped in the car for hrs

...thankfully the window was cracked and we found a piece of wire in the garage and i was able to mc guyver the wire to hit the window switch and get the door open
the second time was at the car wash but my trunk was open so i let the seats down and climbed through and opened the back door.....not as easy as climbing through my 16v gti
now i carry the spare key in my wallet