According to the article Bad molars? The origins of wisdom teeth, in our evolutionary history, people were eating harder food like nuts and had unimpacted wisdom teeth. Later, that article appears to have jumped to the conclusion that if you eat hard food, that can actually cause your wisdom teeth to erupt properly. I don't see any reason for that conclusion. Maybe they made that mistake because it's a reasonable mistake to make but it's actually not true. I think that in our evolutionary history, people reproduced at the age of about 14. Although at the age of 28, I started getting an infection from an impacted wisdom tooth and had to have it removed, that was probably already nearly grandparent age according to our evolutionary history and that explains why the natural selection against that type of problem at that age was weak. Maybe after we started eating soft food, we had an evolutionary advantage in having a smaller jaw but the evoluionary cost in having a smaller jaw was smaller because we could just evolve to slow down the growth of the wisdom teeth to delay the potential problems it causes to grandparent age. Just because a change in diet affected the way we evolved doesn't mean a person's actions affects the way their own body grows at the individual level. I do realize that it some cases, ones own actions affects the way their body grows.
You may be thinking "Why didn't you ask the question 'Why did we evolve to have impacted wisdom teeth when it sometimes causes a severe infection?' before asking this one? You could have used its answer to help you ask this one better." I could do that but then I would just end up explaining that I Google searched "why did we evolve to have crowded wisdom teeth if it can lead to infection" and then got the article Bad molars? The origins of wisdom teeth as the first search result. That's the very article I linked earlier in this question that I explained why I suspect is inaccurate. I don't think it would have been better to ask that question first and then explain how the first search result didn't answer my question when that search result is in fact inaccurate. If the question I have can be answered, some way of asking a sequence of questions and picking which Stack Exchange website to ask each of them on that will get me an answer to the question I have has to be accepted.