Was this rooted in common law, a statute, or a judicial decision, and how was it justified?
Law student (about to graduate) focused on criminal law here;
In modern times, common law crime-crimes that aren't defined by a statute-has been abolished. You can't be punished for something that's not written into law. So in the end, it's because congress passed laws to criminalize it.
Common law really is irrelevant to your question. Neither are judicial decisions. There is no federal common law and you can't criminalize something by judicial decision-courts only interpret laws. There has to be a criminal statute passed by congress to make it illegal (or potentially regulations pursuant to a congressional grant of power).
It's pretty much always been a crime to lie under oath. There are also statutes to that effect. However, courts have the ability to enforce their own power without statute (IE contempt of court). Federal courts arguably don't need any statute to punish someone for lying in court, but there are statutes for that.
However, you're talking about lying to agents. Why that's illegal varies. It could be by violating a different statute through your lies (fraud, obstruction of justice, environmental regulations). It could be lying under oath (especially if you're filing something, IE taxes or regulatory filings).