Every other browser aren’t using macOS native UI therefore are wrong in this environment. But right on their own in being the same everywhere.
If my OS says windows and tabs close on the left, then I expect every single app to be a good platform citizen and not make me relearn default controls just to operate simple functions. Windows and tabs close on the left. End of story.
Firefox is not a bad browser by any means, but it feels like Firefox is the browser equivalent of the “how do you do fellow kids” meme. An out-of-time experience pretending to blend in under the guise of “AI”.
It is also worth noting that the macOS UI/UX isn't anywhere near perfect. It is a hodgepodge of design decisions that go back to the origin of OS X or, in a few cases, the origin of the Macintosh iitself. Padding and margins may help achieve visual balance, but it's Windows management paradigm is an absolute functional mess.
Then again: while I believe bad UI/UX is a thing, I don't think there is an ideal. Different people think in different terms, or have different preferences. Some forms of interaction are better in one domain than another. There are undoubtedly many other reasons.
As for Firefox taking things into their own hands, that's the developer's decision. I have already given two reasons why that may be the case (users may expect consistency across platforms, and it may require too much effort for too little return).