Hearing protection for employees in operating trades (TY&E) is covered by 49 CFR Part 227. As I understand it is basically styled after OSHA requirements.
Use is required when exposed to exposures over 85 dBa and the employee has not had an audio metric baseline or a threshold shift in hearing loss. Use is also required if exposed to an 8-Hour total working allowance of 90dBa +. A bunch of sciency mumbo jumbo with no easy way to measure it on a day to day basis, so it's just easier for the railroad to write a rule mandating their use at all times. The railroad also has to take a sampling of employee work exposures to determine the level of exposures. These would all theoretically be different based on switching service, road service, cab windows open, closed.
[
www.ecfr.gov]
My railroad requires ear protection within 100' of a running locomotive, except if within the cab and all doors and windows are closed.