First time I’ve seen this. On an intercity train in Andalusia, Spain.
Doubly useful because they also serve to hold the bike in place. In France some trains have (lockless) racks with bungees which you pull over the bike.
Both ideas seem to be experimental replacements for the more common hanger racks (where you hang the bike by the wheel). Those were never great for tourists with paniers and they’re becoming untenable in the era of weird-geometry bikes and, um, fat lazy electric ones like the one you see there.


Oh, such an interesting rack-lock! I avoid using hanger racks if possible, also because I have rather broad handlebars and the hanger racks on the trains I use often are rather closely spaced. So I prefer to lean the bike, however with my U-lock it is almost impossible to lock it to something (which is a good idea if I don’t sit close, although I haven’t heard of a bike theft on the trains here in Slovenia yet).
Indeed, I haven’t heard of bike theft on trains either. Problem is, if the thief can pull it off, it makes the perfect crime. As the victim you’re basically screwed the moment the doors close and the train starts to move. This is why I never let my eyes off luggage or bikes when on a train. Even more so on a bus.