I'm not convinced that this is a historical question, perhaps more of an r/warcollege topic, but if we look at military history in the modern age the trend is towards increasing centralization, largely as a result of industrialization and the other factors which produced the modern state. The linkages between industrialization & the increasingly technological nature of war provide a strong logic for the centralization of state control over military activity. Decentralized militias have limited capacity to wage sustained maneuver warfare - the decisive form of warfare in the 20th century and arguably as far back as the 18th century - as they are tied to local supply lines & lack the ability to coordinate industrial production for the increasingly complex technologies of war. One could argue that this is only necessary for offensive war, but closer inspection shows that this is only trivially true: the ability to wage defensive war is fundamentally the same as the ability to wage offensive war, with the exception of certain boutique technologies & state capabilities associated with expeditionary warfare, i.e warfare far beyond one's national borders. Techno-tactical specifics may vary - a tank suited for offensive maneuver in the enemy's territory may be different in exact details from a tank suited for maneuver on internal supply lines - but the basic industrial question of "can we build tanks?" isn't any different. These matters are addressed in much further detail in any undergrad-level strategic studies or modern military history survey text. For instance, Paret's Makers of Modern Strategy, or for more detail of the early modern period perhaps Chris Duffy's Military Experience in the Age of Reason, Showalter's Railroads and Rifles and/or The Wars of German Unification, or maybe Isabel Hull's Absolute Destruction. For a more discerning student, Naveh's In Pursuit of Military Excellence (Chapters 1 and 2).
There is a more foundational question here, though, which is "what is meant by defense?" The form of defense which regional militias are able to offer is fundamentally a "strategy of the weak" which seeks to defeat the invading force by attrition, on the defender's own soil - as I said above, the capacity of militias for decisive maneuver against a centralized force is quite limited and only wanes over time with increasing industrialization of the invading force. If the militias are not out-maneuvered and defeated in detail, they can offer some form of guerrilla resistance, and in the long run these can be difficult for an occupying force to defeat, but it exposes the civilian population to political & social domination for a long period of time as well as the other harms of war and military occupation. In terms of outcome for the civilian population as a whole, as well as the economic and political health of the nation, it's generally preferable to not have the horrors of war visited upon one's own soil - unfortunately the decentralized militia has little to no ability to carry the war outside of their own borders, and in an absolute best case scenario could hope to bog down the invader at or near the border.