Oooh, this is a tough question. I don't know, if there are any rules that dictate this.
I think this may just be one of those things, where it is just the way people talk.
Normally, we use the definite article "the" when we are talking about a specific noun. So, like your example, a specific restaurant or store. They are specific locations to be at.
However, there is a small difference with church and school, that may have influenced why people say "They go to church. " rather than "the church".
Church and school are social/cultural/religious institutions. So, culturally they are more than just places to go, they are almost concepts in and of themselves.
Or it may just be a dialect thing.
For example, in America we say " We are going to the hospital. "
But, some people in Britain say, "We are going to hospital. "
I am curious, what others will think.