Before this phrase was a TV series, it was a political demand for stricter criminal penalties, especially for violent crimes. Since the 1960s it has been a reoccurring theme in American politics whether crimes rates were rising or falling. Wikipedia says the phrase was introduced by Barry Goldwater in his run for president in 1964.
But dictionary.com says the concept was stated by Aristotle and that the phrase has been used since the late 1500s – though they offer no citation. I wouldn’t be at all surprised – legal terms seem to get fossilized into out language.