Medicine believes in psychosomatic illness because the belief is useful despite being false. It allows them to stop medical investigations at some point instead of continuing forever. It allows them to avoid admitting that they don't know why someone is ill.
If someone is medically ill, it's seen as immoral to not do everything possible to help them, so the only way for doctors to stop trying to help is to deny the person is medically ill.
As for the difficulty doctors have admitting that they don't know and can't help, I think it's in large part due to the culture of medicine where historically (going back hundreds of years) doctors just had to pretend they knew what they were doing.
The belief in psychosomatic explanations for illness is however very harmful in the long term because you cannot both believe at the same time that an illness is explained and that it needs to be explained.
That ME/CFS research funding is so low is the predictable result of the medical community believing that there already is a good explanation (from their point of view).