I am quite certain there is no "the" reason to go to church.
There are about 8 general categories of folks when you speak of church.
1. Atheists that have no desire and actually opposed church.
2. Christians that think the churches are evil and engaged in Blasphemy.
3. "Sheeple", folks who just mindlessly go because "that is what you do" and the preacher is always right.
4, Religionists that just love the structure and community and even bureaucracy of church.
5. Folks who do not go except on big holidays -- that feel guilty for not going more.
6. Folks who go because they enjoy it and get something out of it, but do not follow dogma or doctrine.
7. Christian and non-Christians that just could not care less.
8. Those folks who go because they think God told them to and they would go to hell if they did not go.
I go because it is something that you can only get by gathering together with others. Although very clearly we can do that on line now, it just is not the same as actual hugs.
I write Sunday Sermons that are designed away from dogma and doctrine and those who claim to know because they are anointed. The readers I have are about the size of the church I go to. And we share there.
Another thing to think about is the whole meaning of church. When I preached, weather allowing, we were outside. Mostly under a huge Norfolk pine. I don't think the pine would have minded us calling her a church.
If your motives are good. Then that should be "the" reason for going to church.