That definition, if minimized, leads to economic waste, because it fails to reflect opportunity costs.
Sorry. In the context of microeconomics, "cost" usually means "opportunity cost" and I didn't realize I needed to say this explicitly. Dollar costs are usually a pretty good proxy for opportunity costs in many cases, though...
If cost includes opportunity cost, your entire second paragraph ceases to be meaningful, because the cost would necessarily include the opportunity cost of not having priced the good higher and made higher profits. Using opportunity cost as your cost means this kind of underproduction is impossible; your marginal cost is whatever cost would result in the maximum profits.
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.