the word 'order' has multiple definitions so when used in the phrase 'in order to do something', which of those definitions is used?
1 Answer
SHORT ANSWER:
None. It's an idiom.
LONGER ANSWER:
The constructions in order for NP, in order to VERB, in order that CLAUSE arose as natural extensions of the existing phrase in order, which means approximately in the correct sequence or disposition, properly arranged. We still speak of setting things in alphabetical order or of setting our affairs in order.
This notion that things could be "properly arranged" according to some ordering category such as rank or size or date passed in the 17th century into the notion that actions could be "properly arranged" for or to (= in accord with) some ordering principal. OED 1 gives a citation from 1669, "I gave an account in my last [letter] of what I had done in order to His Majesty's commands"—that is, in conformity with what the King commanded.
That in turn easily passed into the notion that actions may be undertaken to accomplish some purpose; that is the sense which survives today.
In the course of this evolution the original sense of "in sequence" and the intermediate sense of "properly arranged" have both disappeared. The modern speaker does not discern or employ any modern definition of order in the construction in order to VERB. It has become a pure idiom—its meaning cannot be inferred from the meanings of the individual words.