Routing might be implemented in a number of ways: it’s sometimes code running on a server that maps a path to files on disk, or logic in a single-page app that waits for changes to the current location and creates a corresponding piece of DOM to display.
Buggy routing (and breaking your browser’s Back button) has been the achilles heel of SPAs since forver. Hopefully better tooling like this URLPattern proposal will help developers better handle the need.
I like what I see from the linked write-up. The feature is disabled by default in every major browser, but there’s a polyfill you can use in the meantime.