Earlier quoted context omitted.
The trains are forced to stop at this accessible location sometimes, just outside the rail yard. They don’t stop for long, so the strategy is to hop on, cut a container open, and throw as much stuff to the ground as you can before the train starts moving again. Then you hop down and look through your spoils for items of value. Hint: look for “lithium ion battery device inside” warning labels.
So if the train cars, or the containers thee packages are kept in within the train cars, were at least so secure that they prevented access for say an hour or two, then this likely wouldn't happen? What is this, open crates or sacks of packages, in traincars locked with a small padlock?
Yes, pretty much. Although in many cases it’s not even a padlock, just a tamper-evident seal device with a serial number matching the paperwork for that container:
https://shipped.com/img-parts/server/php/files/containers/sh...
For huge cargo firms handling tens of thousands of containers daily, padlocks can be problematic operationally and quite expensive.