I wonder why games need installation at all. I can understand that some software like a browser needs it so it can associate some file types with it and start an executable, or add the icon to the Programs/Features component on Windows. But what's the purpose of installing, say, a Steam game? The Steam itself handles installation/removal of a game, updating, starting etc. If I develop my own game launcher (which will use installation) what are the reasons for me to use also an installer for my games?
There are quite a few reasons you'd want to use an installer. Some of them, off the top of my head:
Most games (and indeed, most applications) these days require the use of some supporting DLLs (such as a dynamically-linked C++ runtime or the Direct3D runtimes). Sometimes these DLLs cannot legally be distributed directly and must be installed via redistributable installers. This used to be the case for D3DX DLLs, for example. It's important to read and understand the licensing terms for your dependencies. If you have such a dependency, wrapping up its installation in your own installer can smooth the process out for end-users.
A well-behaved modern program will not require elevated (admin) access to run. However, it might require such access to be installed, and an installer provides a reasonably simple process for doing so that users are more-or-less familiar with.
Similarly, some games will want to generate registry entries to associate file types and the like, as you noted. This can also require elevation.
If a game relies on system-wide installed versions of some of its dependencies (as above) it can benefit from security updates and hotfixes made to those dependencies more easily (the OS takes care of them, not the game developer). But installing those dependencies in system-wise locations also requires elevation, and can be very easy to get wrong if you ask a user (particularly a non-technical user) to do it manually.
Finally, don't forget how easy it is, as somebody who is a tech-savvy user, to underestimate the non-tech-savvy view of computing. Sometimes "double-click to open" is the only skill you can assume (sometimes not even that much); double-clicking an installer launches a program the user can usually "okay, okay, okay" through. Double-clicking a .zip just extracts it ("well where did my game go?") or worse, opens it like a folder, where users will double-click on the .exe and it will fail to run correctly. Users don't always understand installers either, but it is closer to the paradigm they tend to get than "decompress archive and put files in 'the right spot.'"
As for Steam... Steam provides facilities for helping install and uninstall a game, but it does not do everything for you. It's also worth noting that not all games are distributed on Steam or exclusively on Steam, so relying entirely on Steam's installation services will mean those games end up duplicating work for non-Steam distribution channels.
Actually, when steam installs a game, there's still an installer. There are quite a few installer packages around, and to build an installer you use one of these packages and then write an install script which tells the installer software to:
- Move files to the local PC.
- Register COM dlls.
- Add registry entries, possibly depending on a complex script.
- Run any copy-protection algorithms
- Register Services.
- Set environment variables, possibly depending on a complex script.
- Run additional 3rd party installers (DirectX and the .Net Frameworks being the most well known examples)
- Install shortcuts on the desktop and the start menu.
- Register the uninstall procedure.
The decision what to do there is not made by Steam, it's made by the install script, which you need to write no matter which installer package you use, be it WiX, NSIS, or Steam.
Unix has similar steps. You can move much of that logic to the first start of the application, but the logic still exists, you're just splitting the installer into multiple pieces and place one piece into your game instead of an installer. There are pros and contras for doing so, which I'd be happy to discuss in another question.
The question is incredibly ambiguous, but I think OP is asking why games need to be installed and run through a "store" application on the desktop instead of just being standalone.
The answer is simple: the distributor can make more money by tracking what you do, and the Digital Restrictions Management (DRM) is more effective when performed through a remote server operation. The store gateway also serves your eyes and clicks to their salespeople and makes additional purchases easier.
If you're distributing your own game, there is no need for such a store application. Use a simple installer and make your game DRM-free.