>What rational person would ever take that risk?
A rich person who can afford to hire good lawyers. If the DA is offering 2 years for a case that could go 60 then the case is not strong.
The one area I would fight even if not rich is if I was accused of a sexual crime. In the USA this is a life sentence either way. The choice is between spending your life in jail if found guilty or living under a bridge if you plea.