Maybe paid upgrades are the answer?
20 million devices, $30 for the ICS update, 5% take rate = $30 million dollars.
Considering random teenagers in web forums can produce pretty good functional ports there's no way it will cost Samsung more than a few hundred thousand dollars to do the development work. Maybe they have to give the carriers a cut to cover their support costs/retraining/etc. Still a good financial incentive for Android OEMs not to abandon their older devices as quickly.