The theory of capitalism leading to efficient markets makes a great deal of assumptions that are simply not true in the real world. Even for elastic goods that nobody needs to participate in at all, let alone an inelastic good like healthcare where people will pay pretty much anything for themselves or their family members to continue living.
The concept of perfect competition describes what capitalism in its purest, most ideal form should be, and everything after that is a description of what happens when humans get involved.
Capitalism just means private people control the capital, rather than the state. Beyond that and you’re in different forms of capitalism. There’s no requirement of competition.