Netscape, on its deathbed (and I think due to Baker's efforts, in part), open-sourced the Netscape code. Mozilla was created by ex-Netscapers, developed that code, and released a few versions of a Mozilla browser, which followed Netscape's idea of integrating browser, mail client, webpage editor, other stuff (maybe IRC client?).
Sometime later, a few Mozillians decided the web and Mozilla needed a simple, sleek, fast browser, and built Firefox.
Mozilla was created by Netscape itself, before its "deathbed". They were possibly the first "open-core" project of significant scale: they wanted to do a Big Rewrite (Netscape 4 code was unmanageable and crusty), and hoped that doing it as opensource would speed things up. The original Mozilla suite was supposed to be the experimental/rough version, which Netscape would then polish and sell as its own. Unfortunately, by the time this happened (and it did happen - Netscape released a few Mozilla-based versions), the browser market was entirely commoditized and there was no path to profitability for Netscape (which had been absorbed by AOL by then). The Big Rewrite took way longer than expected, and the open setup introduced even more development friction.
The Mozilla suite never got anything else beyond browser/mail/editor. I think the AOL version shipped a bunch of extra bookmarks and that's it. They had already built some infrastructure for extensions and themes though, and that's effectively what Firefox took to extreme consequences: a skunkwork group of Mozilla devs stripped the suite down to the lone browser, and forced everything else to be an extension. That was Phoenix (rebirth and all that), which became Firebird (because people can't spell Phoenix, and the other surviving products could be aligned as Thunderbird and Sunbird), which became Firefox (because oops in IT there's a Firebird already, a database with angry lawyers).
Sometime later, a few Mozillians decided the web and Mozilla needed a simple, sleek, fast browser, and built Firefox.