Firefox uses Cocoa/AppKit extensively. It doesn't "imitiate macOS": it actually uses the system APIs throughout.
The one thing it doesn't do is to use native widgets to render the UI of the browser chrome. Using native widgets for Web content in a cross-platform browser isn't a very attractive proposition, because native widgets either can't be composited at all (Windows, GTK+) or require that you delegate your entire graphics stack to the OS-specific compositor for Web content (macOS). Delegating the entire graphics stack to Core Animation would prevent us from making any improvements to it (for example, WebRender). Given that a lot of browser UI (e.g. preferences) is becoming Web content in both Chrome and Firefox, for consistency's sake it seems better to use the same widgets for chrome and content.
I completely understand the reasons, but the result is an application which does not feel and behave like a native macOS application. It is a lot better than all the Electron crap out there for sure, but it's still a major reason why Firefox can't replace Safari for me.
The one thing it doesn't do is to use native widgets to render the UI of the browser chrome. Using native widgets for Web content in a cross-platform browser isn't a very attractive proposition, because native widgets either can't be composited at all (Windows, GTK+) or require that you delegate your entire graphics stack to the OS-specific compositor for Web content (macOS). Delegating the entire graphics stack to Core Animation would prevent us from making any improvements to it (for example, WebRender). Given that a lot of browser UI (e.g. preferences) is becoming Web content in both Chrome and Firefox, for consistency's sake it seems better to use the same widgets for chrome and content.