Jess410 is right. Company A has profit of $1 million. It buy's company B which has a loss of $800,000. The two companies are consolidated and report net income of $200,000 and pay much less tax that would be paid by A if it had not bought B.
If B has losses of $1.4 million, consolidating creates a net loss of $.4 million and no tax. There may be a loss carryback to get tax refunds by offsetting the net loss against earlier income of A.
For example, "This particular loophole bizarrely allowed profitable American firms to enjoy a large tax break by buying the losses incurred by Eskimo-owned companies in Alaska."
(The Economist, June 26, 2003)