Heroku and Other PaaS providers helps you in application deployment and gives hosting of your application and some other features like High availability, scaling, load balancing, monitoring and ready made environment to run your apps.
Now why they cost? PaaS providers runs your application on virtual instance and use some management and deployment tool in front of it to manage and monitor your application that taken care for you. Manging a server is not easy now a day for big application, you need a high level of expertise and enough time to monitor periodically(may be hours). If you go for free hosting, you will not get all these feature of PaaS. Again it's your choice. If you can't bear down time and any data lose, you should prefer PaaS else you can go for Free hosting.