A person who killed accidentally had to stay in the City of Refuge until the Cohen Gadol died. This could be 1 day or 80 years.
If a person killed on purpose or in a completely faultless manner (Onnes), he does not have to stay in the City of Refuge until the Cohen Gadol dies. (Rambam Hilchot Rotzeach 6:3)
Killing someone on purpose is black and white, either he did or he didn't. There are witnesses and warning, and there is no uncertainty. Same thing when killing someone in a completely faultless manner, either it was or it wasn't. There is no gray area.
Killing someone accidentally (Shogeg) on the other hand, enters a zone of uncertainty. How much of the act was purely accidental, and how much of the act was negligence, etc.?
Judging black and white actions can be done by a human court. Judging intent (the thoughts of man), cannot be judged by a human court, only by G-d (who knows the thoughts of man).
Only G-d knows how much of the act was the fault of the person, and therefore G-d decides how much punishment the killer needs. G-d arranges it so that the murderer spends exactly as much time as he needs to to in the City of Refuge, in order to atone for his sin. If the killer was only marginally at fault, he would need to spend less time in the City of Refuge. If it was less of a pure accident, he might need to spend more time there.
As Rashi (Exodus 21:13) tells us:
...two people--- one killed accidentally and the other killed with premeditation but there were no witnesses who could testify [against them]. [Hence] the latter one was not executed and the former was not sent into exile. G-d then causes them to meet at the same inn. The one who killed with premeditation is sitting under a ladder and the one who killed accidentally goes up the ladder and falls upon the one who killed with premeditation, and kills him, and witnesses testify against him making him liable to be exiled. The result is that the one who killed accidentally is exiled and the one who killed with premeditation is killed.
I don't remember where I learned this.
Also Rashi (Bamidbar 35:25) brings two reasons:
As he causes the Divine Presence to reside in Israel, and lengthens their lives, while the murderer causes the Divine Presence to leave Israel, and shortens their lives, he (the murderer) is unworthy of being in the presence of the Kohein Gadol. (Thus, he must remain confined in exile until the passing of the Kohein Gadol. - Sifri, 20.)
Another interpretation: Because the Kohein Gadol should have prayed that this pitfall not occur in Israel during his lifetime. (Because of the kohein's fault in not praying, the murderer's exile ends with his death (Makos, 11a). Gur Aryeh objects to this intepretation, contending that Makos does not say this, but merely that, if the murderer should pray for the death of the kohein, his prayer might be effective because the kohein did not pray.)