I mean you have to be able to do history manipulation if you want to have history to any meaningful changes you do via JS on a page (and you should make sure to adjust the URL as well so people can go back to that information).
But I agree, it should not be possible to prevent users from leaving back from the site.