A railroad is a large enterprise comprising a huge amount of real estate and physical property. Because it provides its own roadways, structures and equipment, the railroad expends a large part of its assets maintaining itself. Compare a trucking company, whose freight terminal generally includes a gravel-paved yard, loading dock, warehouse, small maintenance garage and a couple of offices. The trucking outfit does not maintain the roads it uses, nor the signals or communications along the road. State and local governments take care of roads, while telephone service is in the hands of private utilities.
Railroads have to maintain their track, their signals and their communications, among other things.
A railroad has locomotive shops for repair of its prime movers, and car shops to maintain rolling stock. There is often a separate electrical department for the wiring inside locomotives. A signal department maintains and repairs signals, while the track department is responsible for roadbed, switches, and the condition of track. The shops of shortlines are small, with crews handling a variety of specialties. By contrast, Class 1 railroads have small armies of workers grouped by specialties, supported by massive shops loaded with the latest machinery.