Yes, the whole history of User-Agent 's is a sad story of non-compliance with standards, vendor extensions, the spread of their support across different browsers and attempts to identify the extensions / technologies supported by clients.
Browsers vied with each other about supporting each other’s capabilities so that sites that give the full or compatible versions of certain User-Agent patterns "do not harm" the new browser that supposedly supports the necessary new items, but have to report it using "alien" elements in his User-Agent , because it was at that time that the sites were viewed.
In addition to Mozilla/5.0 sometimes KHTML also unexpectedly found, like Gecko (Gecko is a Firefox engine) and Safari .
In general, this is a serious historical legacy , which is now mockingly mocked ( Bruce Lawson, Opera Software, "How to destroy the Web", slide "A short sad story of the browser sniffing" ).
According to Bruce, Mozilla prefix was added to browsers to declare support for frames .