In French class they teach you that the preposition pour means "for" and that pour followed by an infinitive means "in order to." So C'est pour toi means "it's for you" and Je vais en France pour apprendre le français means "I'm going to France (in order) to learn French."
So far, so good. What they don't teach you is that pour followed by an infinitive can also act like the coordinating conjunction "and." Two actions can be linked by pour without any cause-effect relationship, in which case pour doesn't mean “in order to," but "and."
Here are some examples:
Il part tous les matins à 7 heures pour revenir le soir à 6 heures.
He leaves every morning at 7:00 and comes back in the evening at 6:00.
NOT “in order to come back”
Il est parti à Londres pour y mourir dix ans plus tard.
He went to London, and died there ten years later.
NOT “in order to die”
La voiture est sortie du virage pour s’écraser contre un rocher.
The car ran off the curve and crashed into a rock.
NOT “in order to crash”
Il arriva à la gare pour s’apercevoir qu’il avait oublié son portefeuille.
He arrived at the station, only to discover that he had forgotten his
NOT "in order to discover"