In Roman Republican times, there were many public offices of great import. Of those, the greatest was that of the Consul. Two consuls (essentially executive leaders in charge of the military) would be elected annually. These two men enjoyed vast powers and influence, and getting to the rank of consul meant you probably made some enemies along the way. Lawsuits were common among the Senatorial class, for both real and perceived slights, some of which resulted in jail time or possibly execution. As now, these lawsuits were often politically motivated and sometimes were just seen as a way to remove a political rival from the running for the higher offices.
In order to allow the consuls to operate autonomously without fear of getting bogged down by politics (especially in war time), they were granted immunity from lawsuits and general repercussions from individuals.
However, they could always be sued for something they did while consul
after they left the office. Thus, consuls under threat of lawsuit by political rivals (most all) would need to find ways to stay in a high office for as long as possible to avoid the threat of lawsuit until they could pay off or eliminate threats to their freedom.
Thus, you had many situations where consuls would feel that, facing probable jail time or execution, they would be better off staying in power for as long as possible, resulting in many military dictatorships being declared over the years, resulting in waves of oppression and made up wars to justify the move rather than necessitate it.
It's possible that setting a precedent of "investigating" your predecessor will teach future presidents that this is a behavior to be expected and they should thus either do everything they can to cover up their misdeeds in office or try to hang on to power as long as possible. Obviously the latter is basically a dictatorship, and while the former might sound good, it might result in a lot of poor governance, especially in times of crucial military/foreign conflict (such as when Russia hacks and influences your elections or owns some of your prominent politicians).