Why is there a statute of limitations?

Why is there a staute of limitations, and who came up with the lengths of the statutes?

The reason is that lawmakers though that it was a bad idea for law enforcement and the courts to pursue criminal acts indefinitely. Even if no criminal convictions were made, it would still be damaging to have people worry about criminal investigations for something that they may or may not have done years earlier. Statutes of Limitations wipe the slate clean after a given number of years.

Not all crimes have a statute of limitations. Murder typically does not and people are investigated, tried, and convicted for murders that happened decades ago.

Several reasons. It’s considered unfair to bring criminal charges, or a civil claim, against a defendant many years after the claimed wrongdoing. People’s memories fade, witnesses die, and records get lost or discarded. What may have been a readiliy-provable defense one year after the event may not work so well 10 years later. There’s also a social benefit in finality or (stated another away) encouraging the prompt resolution of disputes.

Also, at least in the criminal context (although this would also have at least some application to certain kinds of civil claims), the idea of prosecuting someone for something he did 12 years ago (let’s say it was a drug offense, check fraud, or a minor assault) strikes many people as unfair, escpecially if his record has been clean since. The defendant is arguably a different, more mature person, and punishment serves no good purpose any more.

As for you second question - elected legislatures enact statutes of limitation. The length of time generally varies, depending on type of crime or civil claim. More serious wrongs generally have longer statutes.