This is a result of the never-ending war between site developers and web browsers.
Every time a browser comes out with a new feature, developers want to use that feature. But they also need to handle browsers that don't support it.
The most obvious way to do that is often to use the UA string. Look for the browser you know supports the feature, and run your code accordingly. Easy.
Except it isn't that easy, because inevitably what happens is that a few months later the same feature is supported by the other browsers.
So now the other browsers have a problem: Sites are written to use a feature that they support, but those sites only activate the feature for one particular browser.
The solution for the browser vendors: Modify their UA string so that it fools the sites into activating the feature.
This kind of thing has been going on since the 1990's, when IE and Netscape fought the "Browser Wars" ("Mozilla" was Netscape's unique UA string name, so everyone else copied it into their UA string for compatibility), and has continued right through to today (When IE11 was released, its UA string was completely different to IE10's UA string, and this was done specifically in order to break browser sniffing code).
The end result is that the UA strings of all the major browsers are a complete mess. They are full of weird things like the names of their competitors, incorrect version numbers, multiple version numbers, and other obscure references, all aimed at fooling any script that is foolish enough to try to read it. Yes, it might be just about possible to parse it and get reliable browser detection, but it'll probably break again as soon as any of the browsers releases a new version.
On top of that, just to add to the confusion, most browsers also offer config settings to give the user the ability to change the UA string; and some third party products (anti-virus, firewalls, proxies, etc) are known to modify or replace UA strings as well, all of which makes it even less likely that you'll get a reliable response from parsing it.
So what's the take home message from all of this?
Your best best as a developer is simply to ignore the UA string entirely. It is virtually worthless to you for any practical purpose. If you need to use features that may not be available in all browsers, you are generally better off doing feature detection rather than sniffing the UA string (you might want to consider the Modernizr library for this).
Just pretend the UA string doesn't exist, and your life as a developer will be a whole lot easier.