The legacy media loves to call the Supreme Court "political" and its more conservative members "hacks." Here is an example. In a sense they are correct about it being political, even if each of the nine members believes he or she is even-handed.
This is true because justices are appointed by very political people - presidents and their legal advisors. Faced with a vacancy and a consequent opportunity to appoint a justice, a president or his designees look for a sitting appellate judge (usually) whose record and opinions reflect a mindset like that of the current president.
Judges are human and their beliefs and biases "leak" through into their decisions. Democrats look for judges of whose writings they approve; Republicans do the same.
Once appointed to the Court, new justices brings the same set of beliefs and biases to their new work that shaped their earlier decisions. In a sense, they are selected because it is hoped they are model Democrats or Republicans, because they've demonstrated those "earmarks."
Ironically a truly-middle-of-the-road judge would rarely be selected for the high court as he or she would appeal to neither sort of White House occupant.