Many of these places weren't homes. The vast majority of prehistoric people did not live in caves. And many places with art are nearly inaccessible, and completely dark.
I'm not even sure one could separate religious and non-religious purposes. I think there was much less of a distinction. Even in ancient Rome, the gods were involved in many everyday activities, it would surely have been even more so in the Stone Age