Presidents are limited in the amount of time that they serve.
Currently, Presidents are limited to two four-year terms.
Supreme Court justices are given lifetime appointments.
So, if a President nominates a justice who is ideologically similar to the President and the President's followers, the President is ensuring that the President's views will be represented for the entire lifetime appointment. This means that the ideological views will be represented long after the President's term has ended.