That's just not true by definition. Starfleet's role as a military or non-military organization aside... a navy sailor is, by definition, a person trained to fight a war. A country's navy is, by definition, established to fight a war on the high seas. Both the U.S. Navy and the U.S. Army have peacetime roles to fill, obviously, but as organizations they are
both, by definition, established to fight wars on behalf of the United States. That is their primary purpose.
Or, to quote the U.S. Navy itself:
The mission of the Navy is to maintain, train and equip combat-ready Naval forces capable of winning wars, deterring aggression and maintaining freedom of the seas.
Source:
http://www.navy.mil/navydata/organization/org-top.asp