Medicaid and Medicare pay fixed fees set by the government.
Insurance companies negotiate "reasonable" fees for services.
As I have insurance, my medical bill usually looks something like...
Procedure A...... Amt Billed: $2000.......Paid by insurer: $100.... Amt Owed: $25
Where $25 is my co-pay and $100 is the fee the insurance company negotiated as "reasonable". For in-network care, the contracts disallow "balance billing" (trying to collect the $1900 in make-believe charges). For out-of-network (no negotiated rates), the hospital often will balance bill (except where prohibited by law).
It's a completely ridiculous system in which "non-profit" hospitals make billions (and write off those imaginary "losses") and insurance companies (who have to pay our ~80% of revenue on care) are happy to have inflated numbers all over the place because 20% of 100 billion is more than 20% of 10 billion.