The job of the justices is to interpret the Constitution, not maintain a public image. The law profs who authored this are surely aware of that. "Illegitimate" means more than "people dislike it." I think the late Justice Scalia did things right: delivering decisions that aligned with his Constitutional philosophy, even if he ultimately found the results distasteful (nevermind what the public had to say!).
A small YouTube channel I found, hosted by a constitutional litigator, has a number of solid videos about the S.C., and about this "partisanship problem" in particular [1]. The D/R split of the S.C. is much fuzzier than I once thought.
[1]: https://youtu.be/WKfF-WhIm5o