Porting code from one language to another is much faster than writing it from scratch. I'm currently porting my own code from Python to C++ and it's a snap.
Mozilla could've chosen to port the C++ code to Rust, but they didn't because they had other "frivolous" priorities.
People seem to underestimate what a (even somewhat) large codebase entails. Even switching the compiler version is serious effort. Replacing the compiler can already be unfeasible, but apparently, switching the whole language seems to be super simple from the outside.
Mozilla could've chosen to port the C++ code to Rust, but they didn't because they had other "frivolous" priorities.