You're talking as if Apple continues production on the 3GS. Do they really, or do they access old stock? I'm genuinely asking as I don't know - I had assumed they accessed old stock.
They've been selling the 3GS continuously since summer 2009. Of course they're still making new ones. Tim Cook wouldn't have his current job if in his old job he'd accidentally booked years of surplus units.