The Stig wrote:
"These are the voyages of the Starship Enterprise. Her mission: to explore strange new worlds, to seek out new life and new civilizations. To boldly go where no one has gone before."
Sounds to me like the primary mission of the Enterprise and by extension, Starfleet, is one of galactic exploration. Scotty's complaint, and it was a proper one, was that the Enterprise was being dispatched on a covert mission of aggression.
Isn't that quite a leap though? Because they send one ship on a mission of exploration, it is the primary mission of the whole organization?
We honestly don't know what the mission of those other Constitution-class vessels were. Plus, how many of those missions of the Enterprise
were pure exploration with no other concerns? We see them go on offensive missions, defensive missions, missions of pure espionage, missions of support for Earth/Federation colonies, diplomatic courier and emergency courier.
And yet, about the only thing that has ever been consistent in every Star Trek series is that every starship, no matter what its current assignment, will default to exploration as soon as all their government-mandated chores are done. Probably the most blatant example of this is in "Caretaker", where Janeway quotes a broad "directive" to "seek out new worlds and explore space," this despite the fact that they originally got into this predicament in the first place during a convoluted counter-terrorism assignment.
Basically, exploration is their DEFAULT assignment. Combat, patrol and police missions are relegated to a strictly "as needed" basis.