Growing up, my parents were very good at help us see opportunities, and at the same time, making sure that we had enough self-awareness to be honest in our evaluations of ourselves.
If we were going to attend church out of obligation to society, recite the service by rote then we were welcome to stay home and not insult God with our presence.
If, however, we were willing to be open to the opportunity that God might speak to us through someone at church; or God might use us to speak to someone who needed to hear what He had to say; or that our hearts, while possibly not entirely in the moment, could be opened to the moment and we could be absolutely present with not just our body and mind, but our heart and spirit as well.
Of course, we were also taught that God is present everywhere, not just in a church, and our walks after church were filled with a different sort of splendour and praises to God, with flowers vying for most beautiful and trees most full; birds for most beautiful song and the Sun shining brilliantly down on it all.
Our world was filled with God and while obligation might play a part in getting us to church, it rarely remained the reason we stayed.