While he cast himself as a law-and-order president and relished images of himself surrounded by uniforms, he and his aides and allies repeatedly came under scrutiny, most notably during the special counsel’s inquiry into whether he obstructed justice during the investigation into Russia’s interference in the 2016 election and its possible collusion with his team. Throughout his presidency, Mr. Trump’s business, close associates, aides and supporters have come under investigation over a wide variety of issues, sometimes leading to charges of wrongdoing, and his legal troubles did not end with his term on Wednesday.

Mr. Trump cast such investigations as witch hunts or hoaxes, and assailed the officials conducting them as motivated by a political bias, rather than an allegiance to the law.

That theme punctuated the official explanations offered by the White House for clemency grants, and its presence galled government watchdogs, ethicists, public officials and even some supporters of greater use of clemency.