Let's consider the following sentences:
1. A washing machine is used for washing clothes.
2. A washing machine is used to wash clothes.
According to my knowledge, the first sentence with 'used for' is correct. I wonder if 'used to' in the second sentence can also be said.