Your comment makes a lot of assumptions: 1) physician is qualified and competent. 2) diagnosis is correct. 3) treatment is optimal.
Those are all big assumptions. Misdiagnosis and inappropriate treatment are very, very common. "Placebo" prescriptions are common. Something like 25% of presentations at primary care are for medically unexplained symptoms.
However, any half-decent physician will attempt to address obvious psychopathology, if present. I don't believe it is commonly being ignored.
I don't know your case specifics, but in presence of objective abnormalities - there is obviously going to be hesitation to diagnose somatoform.