I for one would fear living in a country where the courts were swayed by public sentiment.
And courts should be "swayed by public sentiment". A judge's job is "to judge", and general societal attitudes play part of that. This is why SCOTUS rulings from 1910 are not the same as today. Otherwise we might as well replace all courts with some AI that would interpret the law to the letter.
Suffice to say, both parties' presidents have nominated Supreme Court justices that never made it past confirmation. Despite the voting procedure, both parties need to find nominees that are at least palatable to some portion of both parties. Extremes in either direction are generally dropped pretty quickly.
And courts are swayed by public sentiment, but it generally takes a long time for such social sentiment to filter up to the courts. And that's a good thing. The last thing we need is a court that decides cases on the whim's and fancies of the average voter.
That's problematic.
Part of the function of courts and judges is to convince people not to "take the law into their own hands", and mete-out punishment by mob. That incentivizes courts to hand-down more severe sentences, especially in scandalous cases. Another part is to interpret the law fairly (Justice as Fairness), a function that is often at odds with the former function.
I don't think it's at all the business of courts to try to appease the mob; that leads inevitably to trial-by-tabloid, which is no kind of justice.
In 1986 the SCOTUS rules that consensual homosexual sex in private could be banned (Bowers v. Hardwick). Such a ruling would be almost unthinkable today, and was already overturned in 2003 (Lawrence v. Texas). All the arguments used in 1986 and 2003 could still be used today because the constitution hasn't changed, but what is and isn't societally acceptable on this front very much has.
I'm not talking about whatever was in the papers this week, or the opinion polls this year, or whatever Biden or Trump or whomever said last week, I'm talking about broad and general shifts in attitudes that take place over years and decades.
You can't really make that claim, objectively.
US elections aren't decided by national majority, so you can't use them as a measure of national majority.
If the game was different, people would play it differently.
For example, Amy Barrett was confirmed by a vote of 55-43, including 3 Democrats.
I'm not sure why you mention "a national majority". It was never a popularity contest. States elect senators, senators confirm Supreme Court justices.
In fact, the more we demand that it match that profile, the less independent it’s likely to become.