I've been developing web applications full time since 1996 and I've never once had to resort to browser detection via user agent strings. It's just bad practice.
The fact that some people have been doing this has led to the very convoluted user agent strings we see today, rather than a simple description of the browser / rendering engine and version.
It's perfectly possible to write code that works cross-browser without having to detect browsers via user agent strings. The closest I've come to any sort of browser specific code is occasionally including IE specific CSS to work around IE bugs, but this included in an IE specific way and is ignored by other browsers.
A browser vendor should be able to put whatever they like in the user agent string, and if that breaks a web site or application, then so be it. It's the fault of the developer for making assumptions.