xulrunner may be a superior technology, but if it's a PITA to work with, then nobody is going to want to use it.
Documentation was poor or non-existent and IIRC the API was based on the half-baked XPCOM because COM and CORBA were all the rage at the time it was created.
That's absolutley not true.
"Rapid Application Development with Mozilla" has been published before 2004. It is still online: http://mb.eschew.org/
XUL (and assorted technologies) is/were broadly documentet on MDN.
When xulrunner was being developed there wasn't the same interest in desktop software. It seems like Chromium reached a point where you could build desktop-class software, but the distribution model wasn't right. Someone then decided to adapt Chromium to solve the distribution problem and you have Electron.
If Firefox had evolved to allow the tipping point experience that Chrome did, then you might well have seen xulrunner be that thing. It was years ahead of itself, but perhaps you could question the focus of the folks on the Mozilla side who were spread across so many concepts/ areas compared to the folks at Google - but I think that's for a different thread.
webapp development is a lot of work and SPAs are actually even harder... and so is server development with node. I love javascript, yet I don't think it's suitable for everything.
electron got popular, because companies could reuse code and tooling, only for the cost of cpu & memory