Who said they were? It may just be a case of a shipbuilding policy by a society that can afford to do such a thing. Long-lived designs like the Oberth-, Miranda-, and Excelsior-classes may have been far more the exception than the rule and may even now have been a result of a bygone era. Starfleet updates a few of their designs, but it seems more common just to incorporate system improvements with new designs simply because they can, and 20-25 years for a single ship isn't that big of a deal to them. Conversely, Klingon shipbuilding policy could be the total opposite and is based on keeping ships around as long as possible. In the "All Good Things..." future timeline, the Enterprise-D was going to be decommissioned after less than 25 years of service until Admiral Riker intervened. So even if a ship is intended to last 100 years, it may fall far short of that depending on how much wear & tear it's actually subjected to during its operational lifetime. I know some may call it wasteful, but if you can swing it, do it, IMO.