It's perjury. Read the other replies. There's nothing good faith about perjury. If you're trying to protect a source, get the source protected by a court order.
Your position seems to be that there are legitimate reasons it was introduced. I don't disagree with that. That doesn't mean that the process doesn't involve lying in court to deprive people of their rights.
You say "conceal a source" but that is precisely depriving the accused of their explicit constitutional right to be "confronted with the witnesses against them".
(I will note that I've definitely been speaking with a US focus - not all of my comments will generalize.)