First, it's worth noting that "for" has many meanings. However, what it's used for in the context of "for +ing" is usually indicating something's purpose, what it was intended for. As far as I can tell, it's paired with a noun.
"Wardrobes are for storing clothes."
On the other hand, while "in order to" using the infinitive of the verb still indicates something's purpose, it shows why something was done. This means it doesn't go with a noun. It can often just be said as "to", with the meaning "in order to" implied.
"I opened the window (in order) to let a breeze in."