Whichever side of the argument though, we have conclusive proof on screen and in dialogue that BOTH viewpoints are correct!
Starfleet could well be "military", but the definition is completely different to what we, in 2013, would recognise.
The Royal Navy of the 1700s was both a military organisation, responsible for the defending of the British Empire and war/conquest if required, but also for exploration. Captain Cook, the HMS Bounty
and even the later voyages of the HMS Beagle
attest to that. This is the closest HISTORICAL
equivalent we have to Starfleet, but depending on the era (and the episode/movie plot) the priority, either military or exploration/scientific, flip/flops as required.