They knew they weren't good at executing on something, so they partnered with a company with a proven track record, and leveraged their brand to make sure both Mozilla and their partner got value.
It's a very successful business model, and has been used everywhere (entertainment is a great example, most IP owners license the creation of content outside of their immediate domain to other developers - toy manufacturers, video game studios, comic book and board games companies, etc).
In a world where the relevance of Firefox is waning, investing in a brand where user centricity, privacy, and security are key, and maintaining high standards on licensees is a winning strategy, especially if Mozilla owns the customer relationships.