As the (fictional) judge said to Matt Damon in Good Will Hunting: "You hit a cop. You go in."
Admittedly, Matt Damon didn't go in for long; instead, he got the deal that led to the story. But in the real world, it's a different story. Sure, in this case, it's a correctional officer rather than a police officer that gets hit. Plus, the defendant was already "in" when he threw the punch, so surely he's not going to get a Damon-like deal. No surprise there.
But what happens in California is that when you hit a cop -- or a correctional officer -- you do indeed go in. And when, as here, you're already in due to a couple of strikes, guess how much time that punch gets you? Yep. 25 to life.
And, I hate to tell ya, your living companions during those decades are far less attractive than Minnie Driver.