It’s illogical to assume someone holding prejudicial beliefs do it because they are motivated by personal gains. Most people are completely unaware that they hold any form of prejudice against specific groups of people and if they are aware they don’t take the time to reflect on it. If they did then they probably would start the process of unlearning many of those beliefs.
What you probably want to think about is how doctors are educated and work in a system that treats fat people in a very specific way. They are part of a larger system that oppresses fat people, along with other marginalized people who deal with similar forms of discrimination when seeking medical services.
The medical industrial complex on the other hand gains a great deal by offering marginalized people care that is subpar compared to groups with more power. If you are giving people subpar care where they face stigma and discrimination when they engage with medical services they are not only less likely to go to the doctor but they are also more likely to not get the treatment they really need. It makes it so you have a huge class of people that are sicker throughout their lifespan and need more intensive health services. That means they end up spending more money long term.
For people who think fat people specifically use more insurance dollars compared to thin people, in reality inequality and lack of stigma free health care services costs us more money because that doesn’t just encompass the harm done by fat phobic health care practitioners but also the racism, sexism, homophobia, transphobia, ableism, classism etc. that is ingrained within the industry overall.