They fired him for what he wrote, not for his religious beliefs.
His writing was an expression of his religious beliefs.
Unless he provably attempted to portray his views as representative of Allstate, they fired him for his religion.
What he wrote WAS traditional Christian doctrine for the past 2,000 years.
What he wrote was an expression of his religious beliefs, no different than standing up in church and confessing them. It was an inherently religious act, just as all other forms of prostelizing are. If the courts don't see this, they're ripping the insides out of the Title VII prohibition against religious discrimination.