The difference is…
a publicly traded insurance company is required by the shareholders that fund it to make larger profits, every year, year after year, forever.
They attempt to achieve this impossible goal of infinite growth by denying more and more claims, while charging more.
A government program like universal healthcare does not need to deny claims. Universal healthcare serves the voters that voted for it. Not shareholders that push companies to destroy themselves for infinite growth.
Insurance contracts are written/worded in a way that allow denial of most claims without much effort. But hard to understand so it is unnoticed by the customer and only the claims adjuster that has read the contract a thousand times would notice.