We do this out of ignorance!
"Thou shalt not take the name of the LORD thy God in vain; for the LORD will not hold him guiltless that taketh his name in vain." - King James Version
In this context Vain means -Not yielding the desired outcome; fruitless: a vain attempt.Lacking substance or worth: vain talk.
Why should we be calling His name if were really not praying to Him or asking for help, or even trying to talk to Him? Their isn't faith mixed in the "Oh my God" speech. We are saying the name of God without really being serious about it.- In vain-
The only forgiveness for this sin is through Jesus.