Admittedly this seems high. Prison guards do work with criminals–in a high security environment, they may be are one mistake away from death or injury. I am not sure how out of luck you have to be to want to be a prison guard.
But lawyers have a lot of perks while they work those hours, in air conditioned offices, catered client meetings, etc. Even DAs work in government office buildings. Most high-hours attorneys burn out after a few years and move on.
I think a better comparison would be to doctors–they work around the clock in literal life/death situations and get paid very little for all the education and training and stress.