If you have tried to install Yosemite, El Capitan or macOS Sierra the download works in a different way.
First of all you download Install MacOSX.dmg (Yosemite or El Capitan), or InstallOS.dmg (Sierra)
then you double-click on the .dmg to get InstallmacOSX.pkg or InstallOS.pkg.
double-click on the .pkg and you will see an installation window.
This installation window does not actually install the OS but creates an installer app in your Applications folder.
Have a look for Install OS X Yosemite.app or Install OS X El Capitan.app or Install macOS .app.
It is this installer app that you use to install the OS of your choice.