The unit economics of "free" work well if your product fits - if you have something that nets you a large operating margin, a good level of conversion to paying users after trying out the free tier (eg people have a reason to upgrade), that most people don't fully utilize their quota (eg you can oversell without killing the service), and, most crucially, is hard to abuse then free tiers can work brilliantly.
I have no idea if Heroku fits that model, but plenty of businesses run it very successfully.
I guess you bring a fair point, I didn't realize they were bought out till this thread. I'm guessing Salesforce is in it for the profits, which is probably fair.