Each door has an ajar switch that says whether the door is open, if it is just the drivers door then i would suggest a faulty switch, if it is all doors then you have 2 options.
1. It developed a fault and someone bypassed the ajar switches so it wouldn't beep the horn and not lock.
2. There is a configuration that has allowed this to happen (mk7 bcm programming via ids)
I've read most locking options thanks to Airthies posting the options he found, but i haven't used them nor have i used zonal locking options so tbh i couldn't say if the option exists or if it has been programmed.
Can't see what use it would be to allow doors to lock you out tho
56 350 2.2 130ps mk7 with 2 side doors
65 290 2.2 125ps custom with 2 side doors
07 350 170ps
Ids v86 licence + v86.04 update + xprog
hereIds map
here