Its costs something, yes - but the fact that effectively the entire professional development community is well aware of Heroku's offerings, have had good experiences with them, and most have direct knowledge of how it all works is also worth something.
I'd wager that's worth significantly more than the few seconds of compute most of us have gotten in exchange.
I think back in the day, that six or seven seconds was likely someone learning, someone playing around with something, but these days people are signing up millions of accounts to try to mine shitcoins six seconds at a time.