There were two reasons for this:
Noble - so that people in the browser can not only read the text, but also launch different menus, windows, blinking buttons, and so on.
Commercial - to wipe the nose of Microsoft. At the time, there was a "browser war" between Netscape Navigator and Internet Explorer, and Netscape decided to bring developers into their browser with a new language.
After that, the sites began to look much more attractive, new features appeared and became more user-friendly.