For + -ing: function
We use for + the -ing form of a verb to talk about the function of something or how something is used:
I need something for storing CDs.
[a PC is a personal computer]
The PC is still the most popular tool for developing software systems.
For + -ing: reason
We use for + the -ing form of a verb to refer to the reason for something:
You should talk to Jane about it. You know, she’s famous for being a good listener. (A lot of people know she’s such a good listener.)
For + -ing or to + infinitive?
We don’t use for + -ing to express our purpose or intention. We use to + infinitive:
We’re going to Lisbon to visit my aunt.
We’re going to Lisbon for visiting my aunt. or … for visit my aunt.
He’s now studying to be a doctor.
He’s now studying for to be a doctor. or … for being a doctor.
You don’t need to bring anything. There’ll be sandwiches to eat and juice to drink.
There’ll be sandwiches for eat and juice for drink.