Former Reuters journalist Matthew Keys sentenced to 2 years for a 40-minute web defacement

Unfortunately, judges have to do what the law specifies. With mandatory sentencing laws, they rarely have much discretion any more.

If you disagree with the law, work to change it. Until then, it is what it is.

Not sure how you imagine prisons make money. Generally, that is by far the most expensive form of punishment there is.