Technically FirefoxOS is still around:
https://www.kaiostech.com/ . It's now an OS for feature phones. It's no longer owned by Mozilla but they did have a lasting impact, that's what I mean. And many of their throwaway projects have gone that way. For example Firefox VR browser is now Wolvic.
https://wolvic.com/en/ . It's the great thing about open source, the work is not lost.
But Mozilla had no chance in the real smartphone market. If Microsoft couldn't manage to attract developers with their billions and dedicated hardware, Firefox supplying only the OS and no hardware just had zero chance to make it mainstream. It would have been relegated to the same position as Sailfish: A cool curiosity but not interesting enough for anyone but some hobbyists to develop for.
I don't think it was a bad idea trying: At that time the duopoly in the smartphone market was not as firmly established and there were other open projects like Ubuntu as well. They might have attracted a huge party like Samsung (after all, they did go for Tizen in the end!) and things might have worked out differently. But the choice to drop it was inevitable at that point.