I've seen the same thing at least a dozen times, and I've never figured out how it happens!
Let me explain...
When an application is packaged for installation the installer can be set to do the install with minimal input from the user or, in some cases, give a custom install option.
When you choose the "simple" install option you pretty much get what you get; this is what the majority of people do. Choosing the custom option normal gives you more control over what gets installed and what gets done during the installation process.
One of the things that gets done during the installation process is file associations. A good application will offer the user a choice of what file associations are to be associated with the application being installed. Unfortunately, not all application installers offer this option, electing to do the draconian thing and associating every file extension that the application can handle to itself.
This is how the file associations can be totally screwed up on your computer.
My advice... if the installer offers a custom install option you should always use this. You may not get the option to choose what file extensions get associated, but on the other hand, you might. As I said, if you elect to choose the simple install option you just get what you get.