That is ignoring the fixed costs.
In the situation you describe (price = marginal cost), it may be impossible for the firm to make a profit; all it can do is minimise its losses, so that it "only" loses its fixed costs. However, since suppliers are making losses, the number of suppliers will contract i.e. this is not an equilibrium situation.
True, there are idealized models of "perfectly competitive markets" where all fixed costs, costs of entry, costs of capital etc are negligible. In that case, price will stay at marginal cost in equilibrium. But "competitive markets" are a bit more general than "perfectly competitive markets".
A slightly more detailed analysis looks at the "capacity" of the suppliers. Suppliers tend to have a marginal cost curve which is fairly flat over a certain range, but then climbs like a sheer cliff when they hit capacity. If every supplier is producing at or near to capacity, no-one makes extra profit from producing more; price is then determined by the demand curve (I.e. at what price will customers demand the current capacity?) Further, at equilibrium, supplier projects which aim to increase capacity will show up as NPV negative (because they are not expected to recover fixed costs, capital costs etc.) So these projects won't happen, and the equilibrium is maintained.
That is ignoring the fixed costs.
It's assuming the fixed costs can be recuperated. Large fixed costs don't mess up the equilibrium, if a firm can exit the industry and sell its initial investment at a comparable price to what they bought it for. It's large fixed investments that can't be liquidated that cause the problems.
In the situation you describe (price = marginal cost), it may be impossible for the firm to make a profit; all it can do is minimise its losses, so that it "only" loses its fixed costs.
The price=marginal cost is a consequ...
Example nicked from this online Berkeley lecture.
Monopolies are bad (morality and economics agree here).
Firms that pollute are bad (morality and economics agree here).
What about monopolies that pollute?
What about strong monopolies that pollute and receive government subsidies?
Well...
Pollution, and other negative externalities, cause firms to produce too much of their product. That's because they don't pay the full cost of the product, including the impact of pollution.
The equilibrium behaviour for monopolies is to produce too little of their product, to keep prices and profits high.
So a monopoly that pollutes is subject to two opposite tendencies: the unpriced-pollution tendency to produce too much, and the monopolistic tendency to produce too little. If the effects are of comparable magnitude, then the monopoly might be much closer to social optimum than a free market would be (the social optimum, incidentally, will generally involve some pollution: we need to accept some pollution in the production of fertiliser, for instance, in order to have enough food to stop people starving).
In fact, if the monopolistic effect is too strong, then the firm may under-produce, even taken the pollution effect into account. In that case, we can approach closer to the social optimum by... subsidising the polluting monopoly to produce more!!
And that, my friends, is why economics is not a morality tale.