I'm a Mozilla employee and I was very deeply involved in Firefox OS work.
On the engineering level, Telefonica was very helpful and working with them was actually a good experience. (can't say the same about all partners :().
Hindsight 20/20 is a powerful bias and it's easy now to talk about why FxOS wasn't meant to be.
All I can say, is that we tried our best and designed a pretty usable device in the end - just week ago I launched my Z3 with latest nightly of Firefox OS 3.0 (from April 2016) and damn, it's actually pretty nice and super smooth, and I'm speaking as a user of the Pixel.
I deeply believe that there's room for an open source operating system and that web stack is a good platform to base it on. The legacy of Firefox OS in form of tons of spec work and engine improvements (Firefox memory usage!) makes it much easier to do this now and I hope someone will.
But anyone building a new mobile OS will be facing the elephant in the room: will you get the top 5 apps to run or be ported on your OS? Without that, no way you can succeed. For FxOS, the unwillingness of Whatsapp to build an official app was more damaging that all the other reasons I read about.
OSes are commodity vehicules for apps, which are rightly what users care about. This gives a lot of power to prominent apps, which are often silos themselves - so maybe the fight to give is to displace these!
I've also known Telefonica engineers and they are some of the best. Maybe my bitterness against the behemoth clouded my words and I apologize for that.
The problem, as Lance said, is their inability to execute anything that doesn't provide them a direct, noticeable impact on sales (said to me by a Telefonica exec)
What I'm truly sorry for is the fact that the Firefox OS flopped. As an engineer, I know that you can build an awesome product but the execs may trash it if it doesn't go in the expected direction. And, with Telefonica, that happens too often.
It does have it's glitches (TV guide screen UI is very unresponsive) but I have few complaints. The Youtube app probably gets some usage as well as screen mirroring from Android/Windows PC.
It does make it hard to learn from the experience though. Maybe the lesson is about learning how to quit at the right time.