It can be used as an excuse for anything at the end of a sentence.
Example #1
Wife: "Where are you going?"
Husband: "I'm gonna go have some drinks with the guys... but it's for the children!"
----------------------
Example #2
Government of the US: "We will be censoring the internet and suppressing your freedom of speech... but it's for the children!"