There was extensive stimulus spending that led to very high deficits during that period.
We had a budget surplus in the decade prior to the crisis, but not right before, and once the Harper gov't took power it slashed revenue through a bunch of tax cuts and then once the crisis hit the opposition demanded stimulus spending or it would bring the gov't down (minority parliament at the time).
And while Canada was "riding a commodity boom" at the time this hardly helped anybody east of Saskatchewan or west of Alberta. You could argue it helped their investments but you'd also be wrong, in 2008 the stock market tumbled the same here as everyone else, including energy stocks.
According to this link, the Canada Federal Budget appears to have been in surplus during 2007-2008 crisis.
Deficits came later.
Their previous fiscal prudence mitigated the problems that struck Italy, Greece and the United States.
Cutting your tax revenue isn't fiscal prudence. It's letting ideology triumph over reality. Harper never met a surplus he didn't throw away.
"austerity ruins the economy"
to the most precise
"austerity ruins an economy, if it's not ridding a commodities boom at the time, and you don't have a private debt grow for compensating what the government is not spending."
Speaking of the popular "austerity ruins the economy", Canada ran a budget surplus during the crisis, enabling them to weather the financial crisis quite well.
Keeping an eye on the accounting books is always a good idea.