In a way it seems like a classic trademark violation, tricking people (or their servers) into thinking your product is someone else’s. I wonder if there are actual agreements about this these days.
User agent strings aren't really seen by people so arguably there is no consumer confusion. And if you need the Mozilla user agent for compatibility it's reminiscent of https://en.wikipedia.org/wiki/Sega_v._Accolade
Yeah, but the case law resulting from the denied ruling could prove valuable for others who need to defend their use of trademarks in API naming. "API" here refers to the broad judicial term, where the User-Agent header falls under.