The Cambridge Grammar of the English Language puts these in the category of adjuncts of purpose.
Adjuncts, roughly speaking, are optional components of a sentence whose presence doesn’t change the meaning or role of other parts.
There are rather a lot of constructions, all with about the same meaning:
Doris Shotz shifted to avoid spilling the cheap champagne. (infinitival)
I bought them to read on the train. (infinitival with object omitted)
And in order to stop me, he locked me in the truck. (in order + infinitival)
I lifted it just barely, you know, so I could get a better look. (so + finite clause)
Let all your calls go to voice mail so that they are recorded. (so + finite clause with that)
I […] stared into his face so as to read every nuance of expression. (so as + infinitival)
He lay there staring at the ceiling with a view to getting back to sleep. (idiomatic preposition phrase containing participial)
The expressions in bold are adjuncts of purpose. Many of them contain clauses. Many of them contain infinitivals or participials, things other grammars might call phrases rather than clauses, but here they seem relevant whatever we call them.
Simple prepositional phrases like for fun are also considered adjuncts of purpose.
(A previous version of this answer said adjuncts of cause, but that is a broader term including not only adjuncts of purpose but also expressions like because X, since X, due to X, etc., which also answer the question why? but without necessarily implying intention or design.)