The 2007 iMac only got dropped with macOS 10.12, which was released in 2016. That's 9 years of full support. The original 2008 MacBook Air, on the other hand, got dropped with macOS 10.8 which was released in 2012, so it only got 4 years of full support. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.