The most likely thing is that the car is disassembled and sold as spare parts, which usually brings in much more money than selling the car itself, especially if the body is old and beat-up. For example, you can probably sell the car's computer or ignition control unit or ABS controller for hundreds of dollars. If someone has a car that runs well and is worth thousands of dollars, he probably won't just give it away for a tax deduction; he'll try to sell it or trade it in. (This is also what happens to lots of stolen cars: they get taken to a "chop shop".)
If the car is of an age old enough to be scrapped or donated, to buy an ECU or other Electronics for a similar car of a similar age probably means the replacement bits are worth more than the car is, which would make the whole exercise uneconomical, further increasing the number of scrap cars and thus, number of replacement ECUs, thereby increasing supply and reducing price.