ANSWER: This was a question posed by a YouTube viewer. I responded by acknowledging that both forms were possible in the given example. I speculated about differences in context, but I didn’t explore them. I think my initial answer needs to be expanded on. I’ll first turn to a trusted source for insight.
In their discussion of gerund and infinitives, Azar and Hagen note the phrase be used for and tie it to the purpose of an object (331). For example, a butter knife is not used for slicing. It’s only used for spreading butter on bread. However, they note that an infitive of purpose is also possible to express a general purpose: A butter knife is only used to spread butter, not slice things. A good distinction Azar and Hagen make is that only an infintive of purpose is used in a specific context: I had no knife, so I used a spoon to spread the butter on my bread. (“For spreading” cannot substitute.)
I’d like to go beyond structure and consider semantics. I think we can further define purpose. Do we mean reason or intention? To explain why something happened (reason), we can use for + noun/pronoun object: He received a medal for his bravery. / He gained recognition for his heroic acts. To explain what someone hoped to gain from doing an action (intention), we can use an infinitive: He put his own life in danger (in order) to save his comrades. I find it difficult to paraphrase this last example so that it includes for + a noun object. Would we say “for the safety and survival of his comrades”? It’s possible, but it sounds wordy to my ears. I prefer the simplicity of the infinitive “to save his comrades.” I think then we might be able to conclude that there are more frequent or preferred patterns when it comes to expressing reason or intention.
A final definition of purpose could be a goal, that is, what a person wishes to obtain. In such a situation, I think either an infinitive or for + noun object could be used: I returned to school for a degree in marketing. / I returned to school (in order) to receive a degree in marketing.
What are your thoughts? Do you think the difference between an infinitive of purpose and for + gerund/ noun object goes beyond form?