Never having been in the service I can only rely on friends comments.
One friend who was in the Navy, Vietnam era, use to say that during boot camp, if you didn't go to services on Sunday, you were given lots of dirty work to do, like clean the head. Knowing this, atheist would go to services just to avoid the inevitable latrine duty etc.
That was exactly what I saw in boot camp in the early 90’s at Lackland AFB. It was “go to church on Sunday” or “clean the barracks”. Many of the holdouts on the first Sunday ended up going the next Sunday, and I don't think it was because they were moved by the Holy Spirit. ;)