Before Errand of Mercy the Federation had the run of the galaxy as it were but after negotiations broke down the Klingons decided to spread their forces throughout the cosmos and make their presence known! Even after the Organian peace treaty was signed they still carried on their 'exploration' of the stars despite that not being their way according to Kirk!

JB
The Klingon came out of nowhere; up until the
EOM episode, we never knew they existed. After that, they were the cosmic rivals to the Federation. The Gorns were a one-and-out (the costumes were too expensive). Miscellaneous bad guys on planets were either left alone, isolated or absorbed into the Federation. The Romulans were a mixed bag and for some reason, Roddenberry decided that the Romulans weren't going to be the big bad guys on the block, rather, the Klingon were the new Soviet empire to have in our new cold war (easier make up and uniforms?).
The Romulan Empire and Federation relations certainly evolved (reinvented) over only three TOS episodes: "Balance of Terror" in S1; "The Deadly Years" in S2; and "The Enterprise Incident" in S3. In
BOT, the Romulans at first look like pre-WWII Germany, beaten and isolated after WWI. Romulus and Remus are isolated from the rest of the galaxy where Outposts are strung around the small RNZ to watch them due to a 100 year old treaty with United Earth (not the Federation).
Captain's Log, stardate 1709.2. Patrolling outposts guarding the neutral zone between planets Romulus and Remus and the rest of the galaxy, received emergency call from outpost 4.
SPOCK: Referring to the map on your screens, you will note beyond the moving position of our vessel, a line of Earth outpost stations. Constructed on asteroids, they monitor the Neutral Zone established by treaty after the Earth-Romulan conflict a century ago.
They developed the military ability to launch sneak attacks, similar to pre-WW2 Germany naval technology with submarines targeting shipping at sea. The end result is that the old Earth Outposts are proved to be vulnerable, but the "Federation" military starships are superior.
Now, the Federation (not just United Earth) must deal with the Romulans who are wanting to nullify the old treaty and start expansion ("all we want is breathing room"). The wise commander sees the real picture: the once, mighty Romulan Star Empire nearly destroyed by the United Earth and now isolated on its only two planets. Even after a hundred years of internal wars to consolidate one party rule on Romulus and Remus, they are still no match with the United Federation of Planets.
Next, the Romulans have a large space zone with a RNZ in
TDY. After
BOT and
EOM, did the Federation re-negotiate the Romulan/Federation borders in an appeasement policy? They probably sent peace Ambassadors such Sarek, or heaven forbid Fox, in which the Federation abandons the old RNZ Outposts and further abandons claim to 1/4 of known space to the Romulans establishing a new RNZ to avoid interstellar war. This new RNZ literally redraws the map to reflect later non-canon star charts showing a large Romulan Star Empire. After all, with the Fed's vast technological superiority in starships, how much trouble can the inferior Romulans cause?
Lastly, in
TEI, we find the Romulans in

Klingon D7's giving them state-of-the-art FTL ships with improved cloaking devices to boot. They now have the military technology to go forth and conquer this vast new territory. The Romulans apparently are quite happy (or busy) establishing (conquering) their new Romulan Empire while the Federation sits neutral on the side lines for the next century until TNG. One hundred year anniversaries must be in vogue in Romulan culture.
It seems that the Romulans are now more related to 1960's China, and the Klingons are now the Soviet Union.
TEI clearly shows a cold war environment with "Mission: Impossible" spy vs. spy activities (next sound stage over, you'd think they could get a few recycled scripts from there

).
FC,
APLW and
EOT show the Klingons involved in proxy wars to get around the Organian Peace Treaty.
Bottom line in TOS, the Federation is not at war with any known threats, so, a large military buildup is not necessary (because treaties work...

).