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.