The judicial ethics code is self imposed by the Judicial Conference of the US (created by Congress), which does not impose those rules upon the Supreme Court. I do not know whether they have the authority to do so. The Supreme Court up until this scandal, had refused to implement their own ethics policy. And the one that they recently adopted is weak, both in terms of requirements and enforcement.
It’s not really a secret