Narrower windows will adjust the layout of the page to be more easily accessible for narrower devices like phones. This is a css feature and does not require JavaScript or similar.
In the context of the linked site which manually uses line breaks this won’t work well aside from fixing the scroll overflow, the text is small on my iPhone when zoomed out to show the full line width. A fix is better than nothing but does not perfectly fix the issue.