Hi,
These are clauses of purpose. Let's mention two different kinds of purpose. First,
General Purpose which explains what something is for in general. For example,
'A table is a piece of furniture for putting things on.' This definition refers to tables in general. As you can see in the example, for + ing is correct. You can also say
'A table is a piece of furniture to put things on.' In this case for + ing and to + infinitive are acceptable.
But when we talk about
Specific Purpose, that is, when the situation is more punctual we
do not use for + ing. We use to + infinitive e.g.
'This is really very heavy. I need a table to put this on.' In this case we are
not defining the word table, we are just pointing out why we need something.
Bye.