He got what he deserved because he had forgotten that as PM it is not incumbent upon him to tell others to jump and for them to respond "How high?", but rather to lead a team. He clearly didn't do that. And the team eventually revolted.
When asked by my keenly observant 16 year old who said "I don't understand why they got rid of Rudd, why did they do that?"
My reply was simple.
"He had forgotten that he was so supposed to work with people and just chose to do what he liked." I am glad that we live in a democracy that calls this sort of behaviour out.