Let me explain why this is the case.
Here is the official definition of a recession.
The NBER does not define a recession in terms of two consecutive quarters of decline in real GDP. Rather, a recession is a significant decline in economic activity spread across the economy, lasting more than a few months, normally visible in real GDP, real income, employment, industrial production, and wholesale-retail sales.
Business Cycle Expansions and Contractions
Now, I'm going to explain the technical reason why GDP can be expanding and still be in a recession. This is going to take some numbers, so bare with me.
If you have taken first year macroeconomics, this equation will be familiar to you
GDP = C + I +G +NX
Or, economic income equals expenditures on consumption, investment, government spending and net exports (exports minus imports).
The US economy is comprised something along the lines of 65% consumption expenditures, 10% investment, 30% government and net exports are -5% (exports are 5% and imports are 10%). The GDP equation would look like this.
GDP = 0.65C + 0.10I + 0.30G + 0.05X - 0.1M
Now, let's say that the world economy is booming but the domestic economy is contracting, such that consumption falls 2%, investment falls 10%, government rises 1%, and exports rise 40% because of the booming global economy while domestic demand for imports is weak, so imports fall 10%. The GDP function will look like this.
GDP = 0.65(1-.02) + 0.10(1-.10) + 0.30(1+.01) + 0.05(1+.4) - 0.10(1-.1)
GDP = .637 + .09 + .303 + 0.07 - .09
GDP = 1.01
In our example, GDP rose 1%.
Now, to the unknowing, this would look like the economy is not in a recession. However, it is, because a
broad-based decline is occurring.
One can differentiate between domestic demand and foreign demand, where domestic demand includes private and government consumption
GDP = (C + I + M + G) + X
You can re-arrange the components of GDP to private consumption + government consumption + foreign consumption
Private consumption is C + I + M, government consumption is G and foreign consumption is X, or
GDP = (C + I + M) + G + X.
In our economy at time 0, the equation would be
GDP = (0.65 + 0.10 - 0.10) + 0.30 + 0.05
GDP = 0.65 + 0.30 + 0.05
At time 1 it would be
GDP = (0.637 + 0.09 - 0.09) + 0.303 + 0.07
GDP = 0.637 + 0.303 + 0.07
Thus, private demand, which accounts for two-thirds of the economy, has fallen by 1.3% (0.65 - 0.637). This is a broad based economic contraction.
Further, the entire domestic economy is contracting if you include government spending. At time 0, economic output would be
GDP = (0.65 + 0.10 - 0.10 + 0.30) + 0.05
GDP = 0.95 + 0.05
At time 1, economic output would be
GDP = (0.637 + 0.09 - 0.09 + 0.303) + 0.07
GDP = 0.94 + 0.07
The entire domestic economy, which accounts for 95% of domestic income, would have contracted by 1% (0.95 - 0.94). The only reason GDP was positive in our example is because foreign demand, exports, rose 2% (0.07 - 0.05). The domestic economy is contracting. The American economy rising on the back of foreign demand is not a sign of economic health.
This is partly explains what was happening in 2008. There were other technical adjustments, such as a build in inventories, which skewed the health of the economy such that GDP was positive.