Pages is for static hosting first, with some dynamism ( think an SPA or just a static site with 1-2 dynamic things). The focus is on the front-end.
Heroku takes your backend application code, and runs it dynamically.
Heroku takes your backend application code, and runs it dynamically.