There's a couple of things going on here:
Bankings sites will use cache-control headers to forbid cacheing of the pages. So when you click back the browser has to reload the page from the server.
Some parts of the site may have a strict flow of pages, e.g. you enter transaction details, enter your SMS code, view transaction confirmation. These require strict tracking of what page you're supposed to be on. So if you click back, it breaks this, and you get an error.
It can also occur because of dubious attempts to improve site security. For example, some banks have session tokens in the URL that change with each request, and if you go back your token is now invalid.
There is usually no strict need for the site to have this behaviour. Going back ten years or so it used to be very common, although less so now.