Unless your last name is Kirk you don't get the Enterprise right out of the gate. You have to pay your dues with "lesser" commands first. Riker found that out the hard way.
Well, technically both Decker and Spock got the Enterprise
as their first commands. But Kirk recommended Decker to replace him, and we don't know how Spock ended up as captain aside from his commanding the vessel while it was assigned to the Academy.
Technically, Decker never left the gate. I don't remember if Spock ever took the cadet crew on a training cruise, but when Kirk came aboard Spock insisted on relinquishing command. "First best destiny" or something.