It is only through laziness and lack of understanding that people couple them together.
The separation that scales is the one that pairs a small piece of DOM (like a piece of text on the page that updates with the current stock price) to the JS that goes with it, and put that into a single file. Now, build your web page out of components instead.
Developing a webpage and adding progressive enhancements to HTML elements is a strongly advised best practice with numerous advantages.
Developing an dynamic application at the complexity of say Photoshop it would be absurd to have a static HTML file with behavior decorated by JavaScript, or try and offer a fallback. Whilst you could in theory perform you photo editing with form submissions and round trips to the server I am not sure it would be worthwhile (I did actually create one circa 2004).
The structure of your code does not have to dictate the result that is served to the user.