That is true, as far as it goes. But keep in mind that all power ultimately flows from the people. And the legitimacy of the Court flows from the belief by the people that the Court is an unbiased interpreter of the law. To the extent the people view the Court - and thus, it’s rulings — as being fair and unbiased, they have legitimacy. It is easier to believe objectivity and lack of bias when the Court is constructed so that diverse viewpoints are brought to bear on the issues. Diversity in race, culture, political viewpoints, background, etc., on the Court is a valuable thing, and a perfectly appropriate factor to take into account when choosing a Justice.