Nature is not about perfection. Nature is about use and balance, one creature associating with another for some benefit to one or the other or both. In the case of plant galls, the intruder benefits at the plant's expense.
Galls are formed from the plant's tissue as the insect or fungus affects it.
For insects, galls provide a birthplace for offspring, food, and shelter.
A comparison of the same leaf after one month; larvae have hatched.
At first glance, galls can sometimes look like plant fruits, berries, or seeds.
Galls are normal even in a healthy forest. From my experience, they affect plants heavily in a particular area, even if surrounding areas are gall-free. I have often wondered why some areas were more susceptible than others to the attacks. Perhaps conditions are more favorable.