Why did the producers decide to get rid of the season 1 music?
Contractual obligation. In order to ensure that composers and musicians stayed employed, union rules didn't allow TV producers to reuse stock music from one season in the subsequent season. If they did want to reuse a music cue, they'd need to bring in musicians and a conductor to re-record it.
Besides, the only reason they reused music at all was lack of money. If they'd been budgeted for it, they would've had newly composed music in every episode, as most US shows are required to do these days. The typical pattern for shows in the '60s and '70s was to budget for original scores for about the first 1/3 or so of the season, then recycle those scores (and maybe various library cues composed specifically for generic use) throughout the rest of the season, then start over with another batch of new scores in the following season, and so on. Due to the limitations on reuse of earlier seasons' music, this meant that each season would generally have its own distinct library of music cues.
And I have no idea why you think season 2 of TOS had disappointing music. I think the music got progressively better from season to season. (Although season 2 did feature the one genuinely poor score of the series, Samuel Matlovsky's "I, Mudd" score, which even the producers disliked and hardly ever reused.)