However, if they have dedicated science vessels, why not dedicated warships?
Presumably there are always scientific, exploratory, and support missions to be undertaken, there may not always be wars to fight. There's enough overlap in the basic design requirements for the two (such as torpedo launchers for probes) that even a vessel designed principally for combat could fulfill other roles.
If Starfleet does have dedicated warships I suspect they're smaller vessels for patrol/escort duty, less powerful in a combat role than the larger starships but more efficient. Half the strength, one quarter the tonnage/cost and such.
But, and perhaps this is a bad comparison in general, consider the fleet maintained by the United States Navy. Its ships and fleet makeup are substantially bigger than is really necessary to perform the duties it is required to perform outside of war.
And for that reason, the U.S. Navy is ridiculously over-priced and laughably inefficient. Most of its hardware was designed to fight a war that will never happen against an enemy that no longer exists using weapons that are already obsolete using tactics that have never been tested in the theatre.
I don't see the Federation as possessing some kind of self-serving notoriously corrupt military industrial complex. Actually, I believe the move away from dedicated warships (and the controversy around the Defiant project, for that matter) is a reaction to precisely this kind of development.
Follow this fictional history: for fifty years, Starfleet built up more and more overtly military hardware to deal with the threat of the Klingon Empire. The Klingons, for their part, built up their military the same way. Then Praxis exploded and the Klingons realized they had spent so much money on their military that they couldn't deal with a simple natural disaster properly (coughHurricaneKatrinacough) and they needed to reorganize. This meant the end of hostilities with the Klingons, and it suddenly left Starfleet holding a bill for a huge and expensive battle fleet that it would never have a chance to use.
In TUC, we have assholes like Admiral Cartwright and such who understand that the organization they created is about to be gutted because its principal mission--fighting the Klingons--has ceased to exist. Even Valeris describes her actions as "saving Starfleet," as if the Klingon threat is Starfleet's only reason to exist! (the Federation seemed to be on surprisingly good terms with the Romulans at the time...).
We don't know what happened after TUC, but in TNG we get a hint that there was some trouble with the Romulans, more tension with the Klingons and later some skirmishes with the Cardassians... none of which approached the scale and intensity of the 23rd century cold war. We can infer from this that within the Klingon Empire some type of cultural revolution occurred, probably a revolt by Khaless fundamentalists seeking to return the Empire to the "true war of the warrior" or some crap like that. This fundamentally changed the political landscape of the High Council, paving the way for a more feudal type of government where the high council retained no real power except the ability to organize the many houses and the ships they controlled to make war against their enemies. From this point on, then, Klingons only fight for personal reasons, with (until Gowron) none of the grand political power plays for the "Glory of the Empire."
With this power dynamic--and since Cartwright's people fail to start the war that had taken over their reason for being--Starfleet had to reinvent itself in order to remain relevant. First, the lack of a mutual enemy lead to the Romulans dusting off their old rivalries, and since the Romulans rarely come out in force, a greater emphasis was put on counterintelligence and electronic warfare (with the main computer completely taking over ship's communications on most vessels). Second, Starfleet either absorbed or subcontrated with the United Earth Space Probe Agency and other scientific organizations from other planets (the Vulcan Science Ministry, for example, and a few others) to become the go-to boys for any and all scientific/industrial/diplomatic operations in Federation space, and they got so good at it that pretty soon they were the only show in town.
After a few decades of this, Starfleet has so thoroughly revamped itself (even gotten snazzy new uniforms that look more astronauty than navy) that it is no longer unusual for starships to have the family members of their crews on board; it has gone from a military organization to a scientific merchant marine--a "scientist marine" if you will--whose combat role is on an "as needed" basis.