I think these questions are answered well enough within the series. Are they answered definitively and neatly? No. You have to remember that this was the beginning, and Starfleet was still evolving. The military's main job is defense
, not exploration of space.
Think of where we are now. Who does that--NASA. So, if Vulcans come along to help us gain the technological sophistication to be able to explore space in a more far-reaching way, you don't
do that (and offend the people you need to help you) by turning NASA and other Earth science organizations into a large military force. Sure, there is some military-style training that goes on in Starfleet for protection purposes, but as you saw with Malcolm, he specifically said that he did not join the military in order to join Starfleet, an officially non-military force.
If you remember what Archer said, he didn't think that any kid of defense outside of the basics was necessary. After coming back from the Expanse, and seeing what all he could encounter, his opinion changed and he realized that defense was very necessary, hence Hayes and co. coming along for the ride and some upgrades to the Enterprise.
Right now, the domestic military is separate, but in the future, especially by the TNG/DS9 era, I think it becomes more integrated or fully integrated. So, you essentially didn't get the context you wanted because they quite literally aren't there yet. At least, that's my view based off of what I've seen so far.