So, usually a president will appoint supreme court justices who are a part of the same political party as the president. This way, the president can assure that he will get that justices vote if the president decides to try and pass a new bill or something of that ilk. Hope this helps!