When I got on the train, I sat down near the bike area, and there was a guy standing outside the toilet. The toilet was unlocked (i.e. the "Open" button was lit up), but a few minutes later I heard a flushing sound from inside, then a woman came out. I've seen this happen before, and normally I'd show them where the "Lock" button is, but in this case I didn't want to seem as though I was queue-jumping.
The guy went in, and closed the door, but he also left it unlocked. Another woman then waited outside, so that she could use it after him. While he was in there, a third woman approached: I told her that there was someone in there, but she'd already pressed the button, so the door slid open. I told the guy inside that he needed to lock the door, which he did, and he thanked me when he left.
By this point, the third woman had left, so the second woman entered (the one who'd been waiting outside all the time). She'd seen and heard everything that happened, but she also left the door unlocked when she went in. While she was in there, another man approached: I told him that there was someone inside (as did the guy sitting opposite me), but again it was too late because he'd already pressed the button. When he realised the problem, and the door started to slide open, he tried to close it by pressing the button again, but I told him that the person inside had to do that. The door closed by itself, but she still didn't lock it. When she came out, she didn't say anything, so it's possible that she didn't speak English. However, if you're familiar with the basic concept of locking a door, and you see someone else get caught out, I'd think that this would offer a good incentive to look for the locking mechanism.
I'm surprised that people seem to have so much trouble with this. Then again, I often have to tell people to press the button so that they can open the main door at a station (after they fail to notice the beeping noise and flashing light), so I guess that there's a general lack of initiative going on.
On the flipside, I had some trouble the last time I took the bus from Oxford to London. I locked the door, but a drunk guy tried to force it open from the outside. I held onto the handle (so that he could feel resistance) and called out "Occupied!", but he still kept tugging. In the end, I let him open it so that he could see me, then he let me finish. When I came out, he apologised, and said that he thought the lock was stuck, so I'm guessing that he used a coin/screwdriver to get in.