He only did it to find the coins he had dropped by the fire box and couldn't reach them.
Once he had the loco standing on end why not just keep it there maybe stand all of the cars on end as well and have the Polish version of the Cadillac ranch