As near as I can determine from reading Madison's notes on the convention debates it had much to do with giving the Federal government some contol over the militia. The 13 colonies (States) resisted this, however if a militia was to be the replacement of a standing army there had to be some commonality of arms. A supply of 50 calibre mini-balls would be little use to a 45 calibre smooth bore. Then of course there was the need for people to be able to hunt for food as well as defend themselves in frontier locations.
The use of the word "bear" might also be taken to mean if you can't pick it up you can't have it.
As much as I disagree with wholesale arming of all and sundry it is in the Constitution so I will defend your right to arm bears, just in case Sarah P. is around.