In the novel The Valiant, the Stargazer's captain and first officer were killed, and Picard took command. He kept it.
Ditto Dax on the USS Aventine in the post-series novels.
But... But.... But.... Enterprise's Captain, Captain Pike, was not killed. And Enterprise returned to Earth after the mission. Kirk was a cadet about to be reprimanded for cheating. Not to mention being a stowaway. But as long as he ends up Captain, it doesn't matter how he gets there.
Even in the new film, he ends up commanding Enterprise in the end. Despite the fact I've seen nothing that suggests he learned anything from what got him demoted in the first place. He simply saves Earth. Again..