I am grateful to have work, as I have been without it. In spite of the fact that they underpay and overwork me.
I am grateful to have an apartment the size of a prison cell that I can still barely manage to afford, as I have been without shelter. I am grateful to have a landlord who allowed me some leeway with payment. In spite of him still charging me a violent price to merely inhabit his space.
I am grateful to have food, even if it is overpriced, uberprocessed garbage, as I have been without.
Point being... I think being grateful is a necessity at times merely to survive. I'm grateful because I have to be. It's most certainly a defense mechanism against capitalism when one lives under a capitalist system however, and you are onto something with the religious connections. This is the opium of the masses presenting us one reason for its namesake.
It is ok to not feel grateful, of course. We must never stop demanding what we are owed and some of us are owed far, far more than others.