They make the money by cannibalizing the parts from the cars. In pieces, a car is worth more then the whole, especially if the car can't run.
But donor beware, many alleged charities that go via this route aren't really legitimate. I did a little research on the topic 11 years ago so my info would be out of date but I donated my car (a broken down 1987 Mazda RX-7) to the Salvation Army. No money was given back or expected back as it was a donation to charity.
I have heard bad things about Cars for Kids, the one that advertises on the radio here in NYC.