In long run, firms will exit an industry in which they are
incurring losses.
A perfectly competitive market earns more profit in short run
when existing firms maximize their profit by selling goods at a
point where marginal cost equals the marginal revenue.
During this time, new firms get more incentives to enter into
that market as it is making more profit. This will increase the
supply and the firms are forced to reduce their prices due to
surplus of goods.
This will lead to losses in the market and the firms are forced
to exit the Industry in long run.