It does apply, but elementary theory is just that: elementary. In the real world, markets are not perfectly competitive. As dickfore said, there are barriers to entry (fixed costs), at the least.
In the event that a firm must pay a high cost to enter a new market, it is dissuaded from doing so unless it can earn positive sustained economic profits. If it observes operating firms earning a positive economic profit, but also observes a high entry cost and anticipates other firms paying that cost to enter the market, it will stay out (it rightly expects the entry of competitive firms to reduce economic profits to zero, and it will be out its sunk costs).
Firms will only enter profitable new markets if the cost of entry is very low, or they anticipate that their position would be defensible. The market for healthcare is relatively difficult to enter, which dissuades the entry of new firms and probably allows for some economic profit. The market is still relatively competitive, however; firms operate with diminished pricing power and their potential for economic profit is diminished (at the point where P ~= MC) but non-zero. These are called contestable non-competitive markets; the individual firms have economic profit but no pricing power - if the profit-maximizing gap between MC and AC is too large, the entry disincentive is lost and the firm will face new competition, lowering the gap. This provides an incetive for incumbent firms to choose to operate at a point inside the profit-maximizing intersect, and consumers benefit from lower prices.
There are also other avenues consumers have to prevent producers from earning high economic profits, ie by raising the cost of capital and/or labor.
Make sense?