When we choose the -ing form, we are thinking of things that are happening, were happening or might be happening. Depending on how we are thinking about it causes us to choose one or the other.
However, if we are talking about the purpose of an object or an action, we normally use the for + verb-ing pattern. Note that this pattern commonly answers the question: What are they (used ...