Yesterday, you asked about how the entry of new firms into a market reduced economic profit. The process here is the opposite of that process. Basically, the exit of firms that are failing will do two things. It will reduce supply in the industry as a whole and it will flatten out the demand curve (make demand less elastic) for a given firm that remains in the industry.
One of the major non-price determinants of supply is the number of sellers. When some of the sellers withdraw from the market, the supply of that product will, all other things being equal, go down. As you can see if you draw a supply and demand graph for yourself, a reduction in supply leads to higher equilibrium prices in the industry.
In addition, when some firms leave the market, the remaining firms have fewer competitors. This means consumers have fewer choices. As they have fewer choices, they will be more likely to stick with a given firm even if it raises its prices. In other words, demand will become less elastic for any given firm.
Together, these factors work to reduce losses. They allow firms to raise their prices without losing as many customers as they might previously have done.