The Jews and Christians started the trend of not taking gods name in vain. And the Muslims followed suit.
Let me explain it thru this funny but true story:
I met a very learned man in Islamic sharia and I asked him the question:
Why is it that your wudu goes when you pass wind ( :D) .
He said ” see, you are presenting yourself to his lord god the omni present. Would you want to present yourself to him after passing gas?!”
I left this guy thinking, what an idiot. It was god who created me with all my gases ( :D). So he knows my problems and gas troubles. Lol
The reason the ancients said not to take gods name in vain, is so that we are always conscious when we say his name. And not become unconsciously repeating his name for it to become meaningless.
But you go ahead 🙂