I'm no economist but reasons might include:
1. Shares had been sold ahead of the news of the loss (out of fear), which turns out to be not so bad as expected. People therefore see an opportunity to buy on the cheap, because the underlying asset (the company) is in better shape than was thought. More buyers = higher share price.
2. People have 'shorted' the shares - selling them at a high price (more sellers = lower share price) and then buying the shares at a lower price to deliver what they have already sold, which in turn puts upward pressure on the share price.
3. The bad news is accompanied by research from the company's brokers that gives a target share price way above the current level.
4. The company's directors are seen to be buying shares in the company - a vote of confidence from the management.
Hope this helps.