Didn't Rust originate as a Mozilla side project? Or maybe I'm misremembering and they were just one of the early adopters of it in Servo.
It was a Mozilla side project, but with Servo, totally in line with its mission of making a good web browser. I'd even say it was a necessary long term plan. Chrome was the better, more modern browser, and Firefox needed fundamental improvements like these to compete. If anything, I think they should have spent more energy on Rust and Servo, not less.
According to https://en.wikipedia.org/wiki/Rust_(programming_language)