I think it's becoming common with things like what you mention along with diabetes, heart disease, etc. But outside of those, I still don't see docs exploring the role of food.
I have a family member that's had chronic pelvic pain for over 20 years now. It's debilitating. She's had no problems getting lots of prescriptions from multiple doctors for various opioids, surgical implants for pain management, physical therapy, etc. The costs to her and her insurance company over the years must be enormous. But not once in those 20+ years has any doctor asked about her diet. Do I think she would be magically cured by ditching the packaged crap and fast food she eats because she's in too much pain to cook most of the time? No. But when nothing else has worked and docs still aren't looking into diet it's infuriating. Whether there is an actual allergy, intolerance, inflammatory reaction or other contributing to the pain that could be eliminated or just the health benefits we all recognize come with eating healthy, it should be the first thing docs are exploring.