In the past generation or so, there have been a lot of grade crossing elimination projects, so I'm sure there are fewer grade crossings to blow for.
The usual arrangement in the old days was baggage cars on the front, coaches next, diner in the middle, and sleepers at the rear. I was always told that the traditional reason was that they wanted to keep the sleepers farther from the noise and smoke of the steam engine. If cars were to be dropped off and added enroute, this arrangement might be adjusted to suit. In its last days, B&O's train 17, the Cleveland Night Express, arrived in Cleveland with only three cars: a combination baggage and snack service car; a coach; and a 10 roomette, 6 bedroom sleeper. East of Akron, these cars were carried on another train in that order, so the separation of coach and sleeper passengers on the longer train couldn't be maintained.
When I rode the Seaboard Air Line's diesel-powered Silver Meteor in 1967, the sleepers were ahead of the coaches, separated by the diner. The boat-tail observation car was for all passengers, both coach and sleeper; but sleeper passengers had to walk all the way back through the coaches to access it. There was a combination bedroom/lounge car for sleeper passengers only, positioned just ahead of the diner. Its lounge seating area had high windows that curved into the ceiling, similar to the curved window in a sightseer lounge.
My understanding is that these decisions are mostly based on the switching requirements enroute and at terminals. The Silver Meteor was a Miami train, but cars for St. Petersburg were cut out enroute, and the specific switching operations may have dictated the order.
Back in the day, head-end baggage, express, and mail cars were often cut out. If the train had to drop a head-end car and a sleeper at an intermediate stop, the RR might decide to run that one head-end car on the rear, coupled to the sleeper that is to be dropped. Or they might decide to run the sleeper at the head-end, right behind the head-end car.
The Auto Train is never turned: sleepers on the north end; coaches on the south, with the auto carriers always trailing.
On that trip on the 1967 Silver Meteor, I remember that all three E unit diesels faced forward. I believe one unit was cut out to handle the St. Petersburg section, while the other two took the major portion of the train into Miami. With two engines facing forward into Miami, a failure of the lead locomotive can be dealt with by simply swapping engine positions. There would be no need to find a turning facility on short notice to keep the train going.
There can be a lot of factors taken into consideration, but the final determining factor generally is efficient operation.