It's not going to allow them to upgrade for free, just reduce their taxable income.
For a simplified example assume that someone has $100,000 of taxable income, in the US they'll be taxed roughly 25% paying $25,000.
If this person is able to write off $2,000 of old equipment when they purchase new equipment they will now have a taxable income of $98,000 still taxed at roughly 25% paying $24,500, a $500 savings.
If they are able to replace $2,000 worth of equipment for $500 then they would, in essence, get the upgrade for free; otherwise they are only able to save some money by donating their old equipment to someone in need.
This person couldn't "donate" their old equipment to a friend, it has to be to a registered non-profit.