I thought it was a deliberate feature of older European stock: don't waste man-hours or train time by running up and down the platform shutting doors, it happens automatically when a certain speed is reached. The doors closed over a Yale-type latch so they couldn't be re-opened.
It added to the fun of foreign holidays by rail.
Mind you, I did once go to the loo on a couchette coach thundering through N Italy in the small hours and realised that the carriage door was open! It seemed safe enough to just close it, rather than any cord-pulling histrionics...
Not had it for a bit, but time for the "RIC/UIC doors" spiel. I spent many years trying to work out how they worked, but this is it. It's the same for plug doors as folding doors, it all works nicely together.
There are, on such coaches, two totally independent systems. One is the door closer, the other is the "door blocking" (translation of Tuerblockierung/bloquage des portes).
The closer is actuated electrically but is carried out by air pressure from a reservoir on the coach. When the guard's UIC square key (the inverse of a UK T-key) is turned in a lock near the door, pressure is applied to the cylinders in the door mechanism, and the door closes, generally pretty firmly. That pressure takes about 10 seconds or so to leak away, but until it does the door can't be opened from the inside or the outside due to the leverage that would be needed to do so against the pressure. Edit: The door at which they operated the key stays open until they close manually (folding doors) or push the close button (plug doors).
The "door blocking" is a feature whereby when the train exceeds 5km/h (determined by each coach individually) the interior door handle mechanism is disconnected mechanically. I'm fairly sure it's a solenoid that does this electrically (as I can't see any way to get air pressure into the door leaf itself). The external door handle is unaffected, so the door can be opened from the outside, but not the inside. It automatically reconnects when the speed drops below 5km/h, you can hear a click as it engages and disengages. In some newer plug door stock this also actuates some sort of feature to pressure-seal the door, e.g. by forcing the door into the body or by blowing up a baffle, but the mechanisms vary.
Not all coaches have both. There were in the 1990s old DB coaches knocking around that had UK style wraparound doors with no closer but still had door blocking, while some countries have the closer but not the blocking mechanism (so in this case the guard closes them but you can reopen them again about 10 seconds later). Doors with the blocking mechanism usually have an orange or red plastic covered handle on a visible box containing the mechanism, those without it's typically the original metal one pretty much flat against the door leaf.
There are also some modifications that have been done over the years. DB introduced Tb0 (Tuerblockierung 0km/h, door blocking at 0km/h) which improved the seals for the closure mechanism and automatically reapplied the pressure periodically so it wouldn't leak away, preventing opening from the inside and out until the driver pressed an unlock button. SBB recently added a facility whereby the seals
weren't improved but closure pressure is applied automatically about every 30 seconds when moving above 5km/h, which means any doors left open by the previous dangerous dispatch process would close themselves fairly quickly. The annoyance of the latter was that if it happened just as you stopped you'd be stuck there unable to open the door for 30 seconds, causing passenger disquiet and delay.
This system isn't "sided", as I discovered in the late 90s when I opened an offside door at a station (fiddling with the handle, not expecting it to open) and almost fell out!
I think that about sums it up.