The issue is whether a constraint is positive or negative. Choosing to handicap oneself, for example by wearing a blindfold, is an indeed a constraint with tangible and predictable effects, but these are negative effects. You can’t see what’s in front of you.
The parent comment advocates for adopting a religion you don’t believe in, for the sake of “constraint.” Self-deception is choosing a blindfold.
You are conflating religious belief with religion. Just the word "religion" is underspecified. Historically and reaching to the present, there have been many communities where the church was the mechanism to deliver healthcare, food distribution, some forms of non-religious education, banking, community bonding and growth, etc. They also had religious services, and the religious leader managed how all the other things were done. Does that count as religion?
Many of the "faithful" were not, in fact, faithful. Or they only applied it to very limited parts of their lives. But they still showed up to church on Sunday, and professed to believe the teachings (in general even if not in any of the particulars).
Adopting a religion you don't believe in is quite common and rational. Do you think all those people who marry into a religion or different denomination are getting brain surgery at the altar? Or if you want to run a business in a community, do you want to be the one guy who doesn't go to church? In some places, that would be both stupid and pointless.