If you're curious why, see this mailing list thread for the discussion:
https://groups.google.com/d/msg/mozilla.dev.platform/-xTei5r...
Here's the money quote from none other than Andreas Gal:
"I do believe this war is lost. Just look around. Almost none of the content users want to watch is available in WebM. The only reason desktop is usable is because of Flash, a proprietary plugin, playing video for us (in H.264, mostly). Even Google, supposedly a proponent of open codecs, never fully converted youtube and never dropped H.264 from Chrome. Taking a principled (I would at this point prefer 'stubborn' I think) stance on H.264 won't change reality. It just hurts us and our users.
Firefox got to the point where we are on desktop today by embracing reality. In the early days we started supporting IE-isms like document.all that were god awfully ugly and non-standard. But it was needed for compatibility so we can give people a usable web experience. The web uses H.264. Thats an unpleasant fact, but its a fact. We have to support it whether we like it or not, so we can be around for the next round and continue to influence the web for the better."
So to say that they "gave up" isn't the whole story. Mozilla recognized that this wasn't a hill worth dying upon, and are willing to make sacrifices in order to remain relevant in the pursuit of keeping the web open.