According to a report made by io9 on Jan 4, 2012, there's a discussion between Benedict Cumberbatch and Alice Eve who are starring in "Star Trek Into Darkness". They give their view on how Jame's T. Kirk came to be the way he is now during the film.
According to what Alice Eve stated:
A lot of us in the film, especially Spock and Bones, serve as Kirk's alter egos of logic and morality, but I do think in this film, after winning the captaincy in the previous movie, we see him earn it… spiritually, really, and sort of philosophically. Other ways than the practical earning of it.
It appears that Kirk's friends and colleagues were the ones responsible for his evolution. They were considered a bit of an alter ego of his concerning his life choices. Both Bones and Spock seemed to have played a role in Kirk's own logic and morality.
Some of this might be seen demonstrated in the older Star Trek T.V. series where at the very end of the show, there's always some moral or string of logic discussed with McCoy or Spock as he's sitting in the captain's chair where the moral of the story winds up with some kind of amusing punchline.
After having been so exposed so many years to them, it's no wonder Kirk has become a great Starfleet captain.
This instance could be played out or even experienced in "Star Trek 5: The Final Frontier" where Kirk is climbing the side of a mountain, looses his grip, and falls. Spock catches him of course. And there was a discussion around the campfire that he knew he would always be safe as long as he's around his friends.
That scene really captures the moment of how almost codependent he is upon his friends and attributes his own character to them, which then of course ties into the first stepping stones into developing a warm friendship with Spock and Bones. That in times of turmoil and horrible times was the first encounter in how his close crew mates would be there for him in his time of need that will be first seen in "Star Trek Into Darkness".