Firms in any industrial structure can generate externalities, both positive and negative. Perfectly competitive firms which don't generate externalities produce the socially or allocatively efficient amount of output; while firms in other industrial structures produce less than the allocatively efficient amount.