It does not matter if Starfleet claims its purpose to be "exploration". Being an
armed force of ships with
JAG,
court-martial and
active duty, which are terms unique to militaries, and the only means of the Federation's defense, makes it a navy and a military organization by definition and by its actions.
Classifying Starfleet as a non-military organization is either a lie or a throwback to the distant past when a navy used to be defined as a separate organization from a military, where military essentially meant foot soldiers. MACO is a prime example of such regression or retrogression. By the modern definition, a
navy, as an armed force,
always denotes a military fleet.
Check the
Mass Effect franchise. It's Bioware's take on
Star Trek without having to deal with its "baggage" and licensing fees. It has something called
Systems Alliance:
The
Systems Alliance is the representative body of
Earth and all
human colonies in
Citadel space. Backed by Earth's most powerful nations, the Alliance has become humanity's military, exploratory, and economic spearhead.
Sound familiar? However, in the dialogue, they refer to its own star fleet as "the Alliance military" while claiming its purpose as "exploration". The prime example is the latest game in the series titled "Mass Effect Andromeda". Search
YouTube for "Mass Effect Andromeda walkthrough" and see for yourself.