When your application has a lot of resources to load (or is on a slow server), there are two possible ways it could react (again, depending on how you programmed it). It either shows a blank page or it looks really broken because it tries its best to run even though not all images are loaded yet. The first makes the user think your game doesn't work at all and the second makes them think it's super glitchy. Both will result in the user closing the browser tab before they got a real impression of your game.
But when you add a preloader which immediately shows a nicely designed loading bar, it gives the player the immediate impression "Yes, this game is working fine, just keep the tab open for a moment. I promise you won't regret it". And when the loading is finished you can be sure that all resources are there and the player experiences your game as you designed it.
When you add preloaders, there are two options: Either one in the beginning which loads all resources at once or one before every level. The first option means it will take longer until the title screen appears. Some players will get impatient and close the browser tab. But on the other hand, loading during the game can also be an annoying interruption. This is a decision you have to make on a case-by-case basis.
By the way, when you want to test how your game would load with a bad internet connection, I recommend the question "How can I simulate a bad internet connection for testing purposes?" (the question applies to stand-alone games, but the answers can be applied when you install a local webserver to put your game on).