Maybe Rich Sommer did not think continuing with this show was his best career move? https://www.primetimer.com/features/rich-sommer-on-how-run-completes-his-bad-tv-husband-trifecta
Ha! (They misidentified Perry Mattfeld in her picture with Sommers.) Bad guys are often more interesting than good guys, though his particular brand of bad guy overlaps a lot with douche, and I totally get why he might want to get out of that pigeonhole. And he doesn't seem to ever play the fun douche, which I guess is more of a comic character, and he hasn't done much comedy lately.
Dramatically I think one of the major characters probably had to go, and in that context, it makes sense it was Dean. I suppose he could have weaseled his way back onto the CPD, but his boss seemed done with him, unless Dean could blackmail him or something. But that's getting a bit in the weeds for Dean.