Use to to explain why
We don’t use for -ing to explain the reason or cause behind something.
Example
- I work hard
 for improvingmy English. ❌- I work hard to improve my English. ✅
 - Turn the TV on
 for watchingthe news. ❌- Turn the TV on to watch the news. ✅
 
Use to and for to show purpose or function
Both to + infinitive and for -ing describe an object’s function (the purpose or intended use of an object).
Example
- This machine is used for cleaning cars.
 - This machine is used to clean cars.
 - This is a special camera for photographing small objects.
 - This is a special camera to photograph small objects.
 
References