Anthropic's C compiler also had an incredible test suite available, and was trained on compiler codebases. It might have been built "from scratch" but compilers are incredibly well-trodden ground.
And to contrast, Cursor's browser explicitly reviewed Servo's architecture before setting out, and still wound up like that.