So sticking your tongue out is to proof that you are not doing black magic and therefore can be trusted to some level, for at least, you are not going to cast some nasty spell the next time you get angry at someone...
It is similar to shaking hands. When we shake hands, we show that there is no weapon in our arm.