Mine does this too. I just bought my golf last week its a 2000 mkiv. apparently the vws are designed so that you can't lock your keys inside the door. once in a while the drivers side will lock after i get out and press the lock button on the key. I think there is a specific order in which you need to turn the car off, take the key out, put the e brake up, close the door, press the lock button in order for it to work, but everytime it works, i forget the order i did the things in.
Jack, August 2009