It was kinda at odds with the whole utopian ideal of Starfleet, yeah, and Kirk definitely felt a little bloodthirsty. To us, sitting at home watching it through a screen, sure, he seems unjustifiably violent.
But I think the in-universe situation needs to be considered as well.
Kirk and the Enterprise have just witnessed a near-total genocide of an entire planet. Spock just saw his mother and his home get turned into cosmic dust in front of him. As someone else has pointed out, 6 billion souls lost - quite literally a thousand times worse than the Holocaust.
No matter how peaceful or diplomatic you are to begin with - which Kirk is most certainly not - this isn't just something you can shrug off and say, "oh well, but the Federation stands for peace!" The film makes it abundantly clear that he's human, with all the flaws that come with it, and he's gonna act on that human impulse. I'm not saying he's right or wrong, I'm saying it's in character for how he was set up.