Among other things, morality is a bunch of heuristics that work pretty well -- often better than explicit calculation, given our limitations -- to produce outcomes that are better for all concerned. (Of course they don't always work.) One reason why the heuristics can work better than explicit calculation is that they take into account (albeit fuzzily and inaccurately) things that may get missed completely in our explicit calculations.
For instance: We tend to think of monopolies as morally bad. But that isn't just because they produce too little of their product and keep prices high. It's broader than that: the intuition is more that they have "too much power" and we don't trust their motives.
For instance: We tend to think of polluting firms as morally bad. But that isn't just because they produce too much of their product. In fact, it isn't at all because they produce too much of their product. If they could produce 10x more of the product without polluting more, that would be just fine. It's because they are doing something harmful -- and because their choice to do that might indicate that they'd be willing to do other harmful things too, if it increased their profits.
Put those two together. A polluting monopoly has too much power and too much willingness to do harmful things. That's a bad combination. Even if they do better than a polluting non-monopoly or a non-polluting monopoly at producing the optimal amount of their product.
For instance: You can change your level of pollution by other means than making more or less product: you can, for instance, change your manufacturing processes. A company that cares about its public image may pollute less in order to preserve that image. A company that demonstrably doesn't mind polluting, and that doesn't need to care about its image to keep its sales up, is unlikely to do that.
For instance: A company that doesn't care about harmful externalities, and that can afford to be inefficient because it has a monopoly, may be more willing to engage in other socially harmful behaviour: bribing politicians (more or less openly; in Western democracies one common way is to offer board seats or lucrative advisory positions to ex-politicians who have voted the "right" way), making products that are themselves harmful, reducing the quality of their product without lowering prices in order to take more profit, etc.
Economics is not a morality tale. But sometimes it is something worse.
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.