I always thought that Starfleet assumed the Federation's military requirements, but more along the lines of the Coast Guard vs the Navy. The Navy is a fighting force, while the Coast Guard is responsible for much more than fighting. Search and rescue, for example.
So Starfleet vessels are equipped for a variety of missions, be it combat or research or whatever. They're not pure warships (well, the Defiant maybe) just as they're not pure science ships. Even the Orbeth class had weapons, while the Enterprise E had science labs.
*if this offends any Navy Coast Guard members, it's through ignorance, not malice.