With respect, I'd suggest that it's normal for sufficiently evolved sentient creatures to wonder about the origins and operation of the world around them and to make up an account that makes sense. Given that without advanced scientific knowledge this would almost certainly involve the concept of 'higher powers', you immediately have the question of 'how do I relate to / influence this higher power in my favour?' and hey presto - religion.