I think because the condition of the Federation force them to do that.
Remember that there are many adversaries in the galaxy that surpass the Federation in both of technology and military power. Thus the Federation needs to develop their Space Navy more and more. And because of the rapid expansion and development of the new technologies (to chase and to reach the Borg technological level) they need to build new ship classes again and again.
Don't use USN as the benchmark / example for the situation of Starfleet, as USN is stay on the highest tier in naval capability on Earth this day. That's why they don't need too many classes to fulfill the role in their rank. Just look at the fleet. There are only a few type of capable USN warships out there. From the old Oliver Hazard Perry, Ticonderoga Class, to Areligh Burge flight 1 and Flight 2A, and 2 Littoral combat Ships classes (and later Sumwalt and Burge III - I use Cruiser, destroyer and frigate and avoid other classes like carrier and LHD etc). Because they are the leader of the world Navy, they don't need to many ship class to fulfill the navy need.
Yet, it is different to China, where is in rapid development and expansion of their navy capability. There are many ship classes type that overlap one to another. Ranged from 051, then 051A, 051B, and 051C, then they have 052, 052A, 052B, 052C, 052D, they have also Russia's Sovr (I forgot how to write it), with Frigates like 054, 054A, 053 with their many variations) and later they will develop 055 Destroyer / Cruiser, and the next gen frigate 054B. Remember, in China, the class 052B and 052C are entirely two different ship classes and have different roles, although both use 052 type hulls and their designation are destroyer.
Not only that, they have even have a lot of submarines classes (Kilo, Improved Kilo, Song, Ming, Yuan, Han, Sui etc) compared to the USN's Los Angeles, Virginia, Ohio, and Seawolf.
So I think the state of Starfleet is the same as China in modern day. They expand, they develop, they improve, but they are not satisfied (yet) to their current level of capability, because they use Borg (and later Dominion) as the benchmark of their development project.
Look at what happen to the new toys that developed by the Fed since the incoming of Borg in TNG. Steamrunner, Defiant, Akira, etc. None of them are capable to match a single borg cube (Star Trek First Contact). So that's why they still developing and build more new ship class. Who know, one of them will capable to match a borg cube. But I think that rapid / crazy development will be slowed down after the event of Star Trek Voyager. The new techs and weapons that brought by the Voyager give the Federation more than enough weapon to stand toe on toe against anyone in the milky way galaxy. IF our Star Trek Writers know about military logic a bit, the new Luna Class should be a new Starship that capable to equip and exploit the new found technology from Voyager, and thus will become their new Ace against the next borg onslought.