I imagine that there must have been reasoning behind the ordering. How precisely did their final order come to be?
They roughly correspond to what they relate to in the Constitution, not level of importance or something like that.
The First Amendment was actually supposed to be this one:
After the first enumeration required by the first article of the Constitution, there shall be one Representative for every thirty thousand, until the number shall amount to one hundred, after which the proportion shall be so regulated by Congress, that there shall be not less than one hundred Representatives, nor less than one Representative for every forty thousand persons, until the number of Representatives shall amount to two hundred; after which the proportion shall be so regulated by Congress, that there shall not be less than two hundred Representatives, nor more than one Representative for every fifty thousand persons.
And the Second Amendment was actually what got ratified as the 27th Amendment:
No law varying the compensation for the services of the Senators and Representatives, shall take effect, until an election of Representatives shall have intervened.
As you can see, both relate to Congress. The 1st Amendment to Article I, Sec. 2 (House of Reps), and the 2nd Amendment to Article I, Sec. 6 (Congressional Compensation), specifically.
The 3rd Amendment (ie our First Amendment) deals with Article I, Sec. 8, the Powers of Congress, as do the next few, followed by Amendments concerning the Judiciary (Article III). Amendments 11/Nine and 12/Ten don't relate to specific parts of the Constitution, and thus are at the end.
So there you have it. Slate's "Explainer" did a short piece on this, which is where I first learned of this,, and although I haven't read it myself, The Bill of Rights: Creation and Reconstruction by Akhil Reed Amar is apparently the source for that piece if you want a more in depth look at the topic.