What if all Confederate leaders were fully prosecuted & executed?

Currently reading Chernow's biography of Grant, and I'm sure he was more informed than I am in 2025, but his determination to grant clemency to practically everyone baffles me. The Confederates were traitors, pure and simple. What harm would have come from hanging Lee, Davis, and anyone else high-up in Confederate hierarchy? Grant seems to assume this would lead to better re-integration of southern states, but what if all the leaders had been executed? What would have happened differently? Would reconstruction have been more effective?