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.