What actually happens when you install a software?
Installation typically involves code (program) being copied/generated from the installation files to new files on the local computer for easier access by the operating system, creating necessary directories, registering environment variables, providing separate program for un-installation etc.
Why do programs use installers?
Some programs are a single .exe file that can be downloaded and run, but as soon as you have multiple files, config files, icons, shortcuts etc. you need a tool to create all these files, which is either an installer or a Zip file containing the files.