On the WK2, the doors should not be able to be unlocked from the outside, if there is a fob present on the inside. So if the fob is inside the vehicle, you should not be able to unlock the door from the outside. There have been posters here, that have locked themselves out, by accidently leaving the fob in the cargo area and shutting the lift gate. I have tried this myself. I rolled down the window; locked the door and tossed the fob on the front seat. I was not able to unlock the door from the outside by pulling on the handle
Did you have another fob with you on the outside? If not, then that is why you couldn't unlock it. If one fob is inside the vehicle you should still be able to unlock it if you have the other fob with you on the outside, but not if the only fob near the vehicle is on the inside.
In fact, if you leave the fob inside the vehicle when you get out, and you lock the doors by pressing the lock button on the armrest and then close the door, it should unlock the doors and honk the horn 3 times to alert you are locking yourself out, and if you haven't opened the door by the end of that third honk it will re-lock the doors and you will be locked out. If it detects a second fob outside the vehicle it doesn't do this and simply keeps the doors locked when you close the door.