More accurately, this doesn't happen except in "egregious" cases. Otherwise, if the judicial system tried to prosecute people for all lies under oath, they wouldn't have time for anything else.
Seriously. Ask someone who works as a judge or a lawyer.