Maybe he didn't care for organized religion, because it required him to "walk the line." He wouldn't do it for his first wife (for whom the song was written), so why for any congregation?
Check out the Bear Family DVD of a couple appearance on Town Hall Party. He did songs like "It Was Jesus" on a country program in the 1950s. He also originally came to Sam Phillips trying to sing gospel. Sam references this in the Good Rockin' Tonight documentary.
Some say that Johnny Cash "wasn't religious" until late in his life. I'd say he had faith even if he wasn't always living right.
I'd say the same about Jerry Lee Lewis. And Elvis.
And you can hear them singing gospel songs together on the "Million Dollar Quartet" after hours tape (when Elvis came back to visit his friends at Sun after moving to RCA).