Starfleet doesn't think of themselves as military. Except when they are.
I don't think having Starfleet programs in school would be that controversial, any more than having any other kind of career training programs in school. They market themselves as explorers, not soldiers. But I guess that would be harder to do after the Dominion War,