I don't think people realize the extent of his blunder. He disobeyed orders (treason) and ends up getting their leader killed. A PRIME. He could've cost them everything. And who's to say he wouldn't pull something like that again? He already had a reputation for being impulsive and reckless. He doesn't truly care about the Autobots or following any sort of structure, he's usually off doing his own thing and disregarding the more important things. So in truth, they should've cracked down on him long before he committed treason, but after getting Optimus killed, they should've put a stop to it right then and there. Ultra Magnus should've had him locked up, then tried in front of an Autobot council. It's a military situation, so his treason could've easily ended with him being executed.