Because the idea of using militia to serve the federal government precedes both: the framers wanted to avoid having a large standing army and instead supplement it with militia.
Why regulated? Because the militia that served during the Revolution had mixed results, with some leaving the battle because they had to take care of their crops and families.
What did they think would solve that problem? Training and regulations from the federal government.
What right allowed them to do that? Art. 1 Sec. 8.
What spelled that out? The Militia Acts.
What's the amendment that justified it? 2A.
Why is "regulated" not simply about being "maintained properly" and why is it not a "people's militia"? Because that makes no sense whatsoever:
Framers (F): You have the right to form militia, and to use that militia to prevent government tyranny. But it has to be regulated: in short, you have to take good care of it.
Individual (I): How is that an individual liberty?
F: It protects you from us in case we become tyrannical.
I: What happens if we don't maintain it properly?
F: Then we can't allow you to do that.
I: What if I don't want to join?
F: You can't because you're part of the people, and therefore part of the militia. After all, it's a "people's militia".
Seriously, just read the context of 2A and you'll see my points:
en.wikipedia.org
en.wikipedia.org