Hitching a ride on a freight used to be perfectly normal among poor people in the States, though they wreren't supposed to.
I've never quite worked out what "riding the rods" means.
It figures in a famous blues:
"Dear Sue your Easy Rider struck this burg today
On a south bound rattler side door Pullman car
Seen him there an' he was on the hog."
------------------------------
Postscript: I've just found this :
Riding The Rails