Markets tend NOT to generate a socially desirable outcome when:
information is equally shared by all parties to a transaction.
external costs or benefits are present.
there are many competing firms in the market.
the goods produced are private goods, rather than public goods.