As a long time reader of science fiction, I think that possibly the Earth was defended by a Solar System defense system and an Inner Solar System defense system if an enemy penetrated that far, and, most powerful of all, an Earth defense system around Earth.
I remember in Second Stage Lensman, part of the Lensman series, a galactic government ruling billions of planets sent a fleet of millions of space battleships to invade another galaxy, but the second galaxy sent their own fleet of millions of space battleships out to meet them. In a gigantic space battle, the invading fleet defeated the defending fleet. Then it headed to the Trallis system, where the planet Tralle, or Trallis III, was the enemy capital planet. The invading fleet pretended to be the defending fleet returning in triumph until it passed within the planetary defenses of Tralle and took over the planet. But another planet in the system, Onlo, or Trallis IX, also had a super defense system, and they couldn't figure out how to get through that defense system, despite having a fleet of millions of space battleships.
So I can imagine concentric force shields to stop enemy ships from approaching, and to stop phaser beams and photon torpedoes, and giant force field generators to generate those force shields. And giant photon torpedo launchers, and giant phaser banks.
I expect that Starfleet Command had designed the defense systems for the solar system and for Earth to stop an attack by the combined Klingon and Romulan fleets and more.
So I think that Starfleet command was as confident as the rulers of Trelle and Onlo that their defense system would stop any attack by their known enemies, and their confidence was just as justified. But V'ger turned out to be much more dangerous and powerful than the combined Romulan and Klingon fleets.
Thus Starfleet Command thought that it was perfectly safe to never have any starships guarding the Solar System and Earth, because they calculated that their defense systems could stop any attack from any known enemy.
They probably thought that sending the barely completed Enterprise to intercept V'ger would be unnecessary and/or useless, but decided to do it anyway since it wouldn't do any harm and had a slight probability of doing something useful.
But when V'ger reached Earth:
CHEKOV: All planetary defence systems have just gone inoperative.
http://www.chakoteya.net/movies/movie1.html
And no doubt after the V'ger incident Starfleet Command put a lot of effort into upgrading the defense systems of Earth.
Then the Whale Probe also overcame the defense systems, and they were upgraded, to fail again during the Borg invasion.
So Starfleet Command probably didn't bother about how fast Klingon ships could reach Earth from their nearest bases, and didn't try to keep starships close to Earth to defend it from a Klingon Sneak Attack.
In fact, Starfleet Command probably usually kept starships far from Earth. and spread disinformation about how weak Earth's defense system was, in attempt to lure the Klingons into launching an attack on Earth and getting wiped out by Earth's defense systems, enabling the Federation to easily defeat the rest of the Klingon forces.
But presumably Klingon spies revealed how powerful Earth's defense systems were, and that Earth was hoping the Klingons would attack.