This is a major frustration in a nutshell but you have to know that in addition to the short notice that they are about to get out for the return trip back home all the time they spend off duty in the hotel room counts (to the railroad) as time off, in other words it counts as if it totally belongs to them to do with as they please going about all their normal business. In reality they are in a hotel many times with limited meal options, with no way to visit family or to help out around the house, to conduct any of the other normal household business. Their time in the hotels is not their time at all to the point where the actual time they spend on a run (a round trip) can be multiple days and only a part of that time is compensated.
A recent text I had from my relative currently with a railroad gives the railroad's perspective quite clearly during a Zoom meeting - "Y'all hired out to work 24/7/365, we are going to make good employees out of you all."
I am part of a fourth generation railroad family. Three of the last four generations, beginning in 1942, have worked on the railroad. It skipped me because I went a different direction.
EDIT: I forgot to mention that the ultimate goal of the railroads is to decrease train crew size to 1. Each of these trains will be driven by a one-man train "crew". A couple decades ago normal crew size was three - engineer, brakeman, conductor. Brakeman positions were eliminated leaving the engineer and conductors rolling the trains. The railroads were supposed to be using PTC, positive train control a long time ago but were able to dodge the upgrades to track and infrastructure in the typical American corporate way by delaying using a standard set of excuses. PTC would bring about a single man crew by automating almost everything. That would mean huge loss of jobs and a huge investment in infrastructure upgrades since many thousands of miles of tracks have speed limits that are in place due to trackage that can't handle higher speeds safely. There's a lot going on here and it's always deeper than one single argument.