I think we've all done that LOL! Opened the door on somebody who doesn't lock I mean, not actually been the 'victim'!
Best occurence I ever saw of this was as a passenger many years back on a Voyager. Vestibule was packed solid with standees - as usual - and along came an intended toilet user, hit the button, and the big door slowly rolled back, to reveal a horrified 'rabbit in headlights' face from a woman midway through her lav duties... It must be awful if you're the poor sod on the bog, but it's amusing if you're just an observer
I usually manage to resist the urge to laugh when I do it to someone on my train, though
As for dodgers on 158s, it never ceases to amaze me how they always choose the 'big' disabled toilet, with it's easily-isolated sliding door, rather than the 'small' toilet with the inward-opening hinged door which they could easily block if they really wanted to. It's a satisfying feeling when you isolate the air and slide the door open to reveal a couple of boneheads hiding in there!