Not sure of the answer to your question but I think that the answer will not alter the overall effect
Legal texts with a preamble before the operative clause (e.g. A being the case, there shall be B) are not unusual. The preamble "sets the scene" and may (but does not have to) commence with "Whereas..." of "As"- see this question.
The Constitution itself starts with a preamble
We the People of the United States, in Order to form a more perfect
Union, establish Justice, insure domestic Tranquility, provide for the
common defence, promote the general Welfare, and secure the Blessings
of Liberty to ourselves and our Posterity, do ordain and establish
this Constitution for the United States of America.
Preambles "set the scene" but within that general idea different uses of preambles can be discerned. They may be used to convey a sense of dignity and purpose perhaps with a reassurance about good and noble intentions. The preamble to the constitution (above) is like that.
Sometimes a preamble will set out some kind of justification for what follows. For example the 18th Amendment could have been drafted to start:
Alcohol being the cause of many vices and a mother's ruin...
and the 21st Amendment could have had a preamble saying:
As wine doth gladden the heart of man...
Preambles don't normally affect the meaning of the operative part because the operative part should be clear in its own terms but if the meaning of the operative part is ambiguous, so that the court has to look outside its terms for clues as to what might have been intended, then the preamble is one of the things which might shed light on the intended meaning. For example if you had an amendment saying the brewing of alcohol shall be prohibited you could argue that that just prohibits beer and not cider or wine, but if there were a preamble saying alcohol in all its forms is pernicious and a great evil that would suggest that all alcohol is prohibited even alcohol which does not require brewing as part of is production.
It is possible to read too much into preambles. Laws generally have to be fairly simple to be effective so there is nothing unusual per se in a law which goes further than the precise problem set out in the preamble. For example if the text read
As the reckless driving of automobiles is a danger to horse riders, it shall be prohibited to drive faster than 30 miles per hour.
that obviously would not mean that it is OK to drive faster than 30 miles per hour as long as you are not driving recklessly and as long as there are no horse riders around.
I don't know why the Second Amendment has a preamble whereas others do not but I don't think there necessarily has to be a reason. There are a lot of amendments but they were not all passed at the same time - it is not as if you have a long document drafted at a single time and are looking for reasons why the same drafter used different styles in different parts.
If I had to guess why the Second Amendment has the preamble which it does my guess would be that the preamble is designed to make the proposed amendment acceptable to those who were concerned about standing armies. There is evidence of concern at the time about having a permanent army - that it might become an oppressor of the people in peacetime when it is not occupied in fighting. Some evidence of this concern can be found in the Third Amendment passed the same year. The emphasis in the preamble on a well regulated Militia being necessary for the security of a free State may be in effect saying to doubters bearing arms is necessary for a proper Militia - it doesn't have to mean a standing army and loss of freedom
But that is just a guess on my part.
I cannot shed any more light on why the Second Amendment has a preamble whereas others do not. However I would observe that a key point in understanding the overall issue is that the text of the Second Amendment does not create a right to bear arms. The way you word the question might seems to suggest that it does and thus gives the precise wording of the text perhaps greater importance that it deserves.
The text presupposes an existing right to bear arms and states that that existing right "shall not be infringed". What is the difference between creating a constitutional right to bear arms and creating a constitutional right to the non-infringement of an existing right to bear arms?, I hear you ask.
It can make a difference to the importance of the preamble. Normally preambles have no effect but if the Second amendment had said Because we need Militias there shall be a right to bear arms then you could possibly argue that the intended meaning is that there should be a right to bear arms as part of a Militia (but not otherwise). I don't think this would be a very good argument because the idea of Militias (as distinct from standing armies) is that they come into action when needed so you need individual people to have arms at home so that they, together with their arms, can form a militia when needed. But it is an argument which could be made if the Second Amendment had created a right to bear arms.
But because the Second Amendment does not create a right to bear arms that argument cannot be made.
You could make an argument, based on the preamble, that the First Amendment should be interpreted to mean the right to bear arms shall not be removed in the case of Militias (but may be removed in other cases) but that reading, though not impossible, would be quite strained because the word used is infringed which is quite an emphatic word with the sense of not interfered with at all. If the intent had been to say that only part of the existing right was to be protected then "shall not be infringed" would be an odd choice of words.
So the fact that the First Amendment is not worded as the creation of a right, and it is not even worded as defining the right which is not to be infringed, but is simply states a constitutional prohibition on the infringement of a existing right defined elsewhere means that it is difficult to give the preamble (why ever it is there) any weight in modifying the the otherwise straightforward simple meaning of the text.
Of course that leaves the nature of the existing right which is not to be infringed up for debate. As with everything to do with the Common Law there is no written code to be consulted: you have to work out what the Common Law was when the Second Amendment was passed using decided cases (which set legal precedents) and written texts considered authoritative such as William Blackstone's Commentaries on the Laws of England (1765).
The nature of the existing right which the Second Amendment prohibits the infringement of was identified by the US Supreme Court (in the case of [DISTRICT OF COLUMBIA ET AL. v. HELLER])3 as the right of having arms for defence which existed at the time in the English Common Law (and therefore in the law of each state). It said that that existing right to bear arms was an individual right and not a collective right limited to organised militias, and that the Second Amendment to the Constitution merely codified that existing individual right (rather than creating a new right).
William Blackstone in Vol. 1, Commentaries on the Laws of England (1765) states:
The fifth and last auxiliary right of the subject, that I shall at
present mention, is that of having arms for their defense, suitable to
their condition and degree, and such as are allowed by law. Which is
also declared by the same statute I W. & M. st.2. c. 2. and is indeed
a public allowance, under due restrictions, of the natural right of
resistance and self-preservation, when the sanctions of society and
laws are found insufficient to restrain the violence of oppression.
SCOTUS refer to this saying:
By the time of the founding, the right to have arms had become
fundamental for English subjects. See Malcolm 122–134. Blackstone,
whose works, we have said, “constituted the preeminent authority on
English law for the founding generation,” Alden v. Maine, 527 U. S.
706, 715 (1999), cited the arms provision of the Bill of Rights as one
of the fundamental rights of Englishmen. See 1 Blackstone 136, 139–140
(1765). His description of it cannot possibly be thought to tie it to
militia or military service. It was, he said, “the natural right of
resistance and selfpreservation,” id., at 139, and “the right of
having and using arms for self-preservation and defence,” id., at 140;
Cite as: 554 U. S. ____ (2008) 21 Opinion of the Court see also 3 id.,
at 2–4 (1768). Other contemporary authorities concurred.
The rationale appears to be that because the right of resistance and self-preservation is a natural right it cannot be a right conditional on military service.
The SCOTUS majority opinion concludes:
Putting all of these textual elements together, we find that they
guarantee the individual right to possess and carry weapons in case of
confrontation. This meaning is strongly confirmed by the historical
background of the Second Amendment.
We look to this because it has always been widely understood that the
Second Amendment, like the First and Fourth Amendments, codified a
pre-existing right. The very text of the Second Amendment implicitly
recognizes the pre-existence of the right and declares only that it
“shall not be infringed.” As we said in United States v. Cruikshank,
92 U. S. 542, 553 (1876), “[t]his is not a right granted by the
Constitution. Neither is it in any manner dependent upon that
instrument for its existence. The Second amendment declares that it
shall not be infringed
Random note on the wider issue
I know that the right of private citizens in the USA to walk around with firearms for personal protection (rather than, for example, just for hunting) is controversial and many people in the US would like to see more restrictions, whilst others may regard any restrictions as the "thin end of the wedge". For those who want to develop legal arguments that the right to bear arms should be understood to be more restrictive than it is currently considered to be the most fruitful area of legal research would probably be the content of the English Common Law at the time (rather than the wording of the 2nd Amendment). Blackstone refers (in the quote above) to a public allowance, under due restrictions, of the natural right of resistance and self-preservation, when the sanctions of society and laws are found insufficient to restrain the violence of oppression - plenty of room for arguments about conditions and qualifications there.