what are these "online installers" for?
Reasons vary.
They allow you to download only what you actually want to install. If you have options during the installation, or the program is available in both 32 bit or 64 bit variants, or variants based on the OS version you're running, you don't download more than you actually install. Other distributors might make you choose the correct variant before you download the program at all; and some users might not be capable of selecting the correct option.
Some programs come bundled with dependencies, like runtimes or frameworks (I have seen Visual C++ Runtime, .NET, DirectX; Java could also be possible). Online installers restrict download and installation of those to machines that don't already have them (thanks @billc.cn).
Additionally, it allows the software makers to make sure you always install only up to date versions instead of one you downloaded a year ago. Some Downloads folder contents are downright scary.
It might even be that they save some bandwidth, since more users might be downloading the installer than are actually installing the program.
They are also a possible way to inform the software makers about every actual installation, as opposed to installer downloads.
For Blizzard products, the downloader optionally uses bittorrent behind the scenes.
Also, some browsers don't support restarting downloads, so this can make large downloads possible on old computers.
Using an online installer downloads the installation files, from the installer. This means you get the absolute latest version possible, from the provider of the installer.
With an offline installer, it might not be updated as frequently, so your version could be slightly behind.
An example, Chrome. Instead of constantly having to update the installer, they can just push new content to a web server, and the same installer can handle it indefinitely.