It was all an act. Ozzy himself said he was a Christian and believed in God. If you read the lyrics he wrote while in black sabbath and as a solo artist, it's mostly positive messages about spiritual redemption, turning away from evil and bettering oneself. He never sang about worshipping satan or blasphemed Christ.