On the other hand Mozilla has to pay for infrastructure (and here they have to support multiplatforms and multi OS developments), development, legal, taxes, marketing etc... etc.. It's not even comparable in any order of magnitude the costs involved.
If Mozilla would be to survive with volunteers would be even more miles ahead of other browsers. You can see Thunderbird as an example that Mozilla stopped maintaining since years the development pace slowed considerably.
On a side note: I really wish for the sake of the internet that Mozilla gets their s* together and start to improve their products to be really competitors to Chrome and Safari.
Generate a HTML doc with tables with 200.000 rows and columns with table cells with non-zero height/width and try to scroll fluidly on a tablet for example. Works in FF, works in Safari, doesn't work in Chrome.
True that there is historical baggage with HTML tables and maybe these optimizations aren't a good focus, but I doubt there are many website where all modern browser are at least competitive.
The performance-critical parts of vim are written in C. You can't say that about emacs. Or firefox.