Before ES modules, you loaded scripts with <script> tags. All variables were global, causing naming conflicts.
<script src="utils.js"></script>
<script src="app.js"></script>
Order mattered. Dependencies were implicit. Large projects became tangled webs of scripts. Modules solved these problems.