Like in software, pretty sure the main expense is R&D.
The real difference between the two sectors is that for medicine, you have a captive audience. People are willing to give up their life savings for certain medical interventions. That same cannot be said for software.
There are, of course, also instances of gouging. But it’s not like these things should inherently cost $20/mo, or whatever, if you want to be able to pay biomedical researchers enough not to go do something else highly compensated like finance/consulting/whatever. Sadly, I had a lot of classmates in engineering school who went that route instead. We urgently need more nuclear reactors, but one of the smartest guys I know, a nuclear engineer, is doing healthcare private equity.
A lot of saas is more like $200+/mo for businesses, and chatgpt might be $20/mo for consumers, but there are companies paying $1m/mo or more for that api.
Personally I'd rather have a system where these kinds of innovations are made and where they eventually become widely available than a system where govt or others forcefully take or force-price an innovation, thus harming future innovations.