Scott was a supporting character in most of TOS, and that character had a strange split-personality. Sometimes Scott was a calm, cool, pleasant professional who was obviously easy to get along with. ("The Galileo Seven", "The Corbomite Maneuver") Other times, Scott was a bit of a hot head, at times getting shrill. ("Who Mourns for Adonais?") Scott's third personality, which never made sense to me, was that of a drunk. "The Trouble with Tribbles" made sense, because everybody simply had too much to drink. But by TMP2, it seemed we were assuming that Scott regularly got into trouble. I never bought into that.
I always preferred his "Corbomite"/"Galileo" personality. He seemed to enjoy his work and had a disciplined personality. He was calm, cool and collected. And likable.
In "The Galileo Seven", both Kirk and Spock face command challenges. It looks to me like Spock was assigned this mission as part of some command test or requirement. Maybe this was the point when he was up for promotion to full commander. Kirk has to recover the missing shuttlecraft while trying to remain diplomatic with Ferris. Spock has to keep his expedition team alive and get his shuttlecraft back in order while maintaining the faith of his crew. Boma represented Spock's failure to earn the faith of his crew. Spock suffered a loss of confidence not because of Boma, but because of his failure in dealing with the indigenous creatures correctly. His ultra-logical mind could not understand the apes' state of mind and ward them off. Boma was the warning sign, much moreso than McCoy, that Spock had screwed up and was loosing the crew's confidence. Was Boma justified in his insubordination? No, but if Kirk wanted to dig into it once they were safely back aboard, he would've been obliged to examine Spock's conduct on Taurus II as well. Both Spock and Boma could've been in hot water for that.
As it turned out, both men probably were likely called in before the captain's review of the matter, the matter was set aside and the men were encouraged to do the same. Even if Spock had done the right thing, it was still possible that some or all of the expedition could have been lost on Taurus II. They laugh it all off in the end because they realized how lucky they were to make it back alive.
"The Galileo Seven" was great because it showed the ultra-logical Spock struggling with a command situation he wasn't expecting and that his way of thinking did not allow for. So Spock grew as a character by facing his failures and learning from them (but stubbornly not admitting to them). Commissioner Ferris forces Kirk to face the music for sending ship's personnel into harm's way, delaying the Makus III delivery mission. The clash between Kirk and Ferris isn't just a clash of personalities, it's a clash of philosophies. Kirk must send crewmembers into hazardous situations regularly, in the name of duty, science and security. For him, the Murasaki 312 mission is part of Starfleet's job. For Ferris, it is a ridiculous risk of lives and a waste of time. Both Kirk and Spock are forced to eat a slice of humble pie, while their respective crews are forced to concentrate on their jobs to remedy this disaster. Scott comes in here very nicely. (So do Uhura, Sulu and Kelowitz)
Whether it was a deliberate decision or an accident, this was one of the first big examples of STAR TREK becoming an ensemble show, not just "starring William Shatner".