Star Fleet also provides many other services: exploration of new territory, colonizing expeditions, convoy escorts, customs regulation, and humanitarian efforts. They support a wide variety of scientific and technical projects as well.
Star Fleet was conceived in the Year 71, and in Year 117 it was complete. At that time, the Federation adopted the policy that no members were no maintain ships of war, which was endorsed by a vast majority who weren't capable of producing starships anyway.
With today's technology, there are many ways to avoid reliance on personal competance: robots, computer networks, neural interfaces, implanted devices, nanotechnology, biotech, genetic engineering, and so forth.
However, history has clearly shown that an overdependence on automated machinery means eventual stagnation of the culture into a leisure society. An emphasis on individual competance over automation is a universal constant among starfaring cultures: Klingons, Romulans, Gorns, Kzinti, Humans, Vulcans, Andorians, and Orions.
Star Fleet officers cannot afford the `easy out' of excessive automation. They must remain alert and prepared for challenge at any time.
[...Earth learned a particularly harsh lesson on creating technological 'supermen' with its Eugenics Wars centuries ago...]
In addition, the races remain largely segregated. Bases and ships generally are dominated by a single race, with only 10% or less of the personnel being 'aliens'. Prejudice, while sometimes a problem is not generally tolerated. It is said that the qualificatios for entrance into Star Fleet are skewed in favor of humans. However, once within the ranks, the bias is fairly well controlled.