Religion did not begin with compassion. The gods of the ancient Near East were not exactly epitomes of goodness.
In the flood story of the Gilgamesh Epic, the gods destroyed humanity not because they were reacting to unbridled violence and sin, as in the biblical (and quranic) versions, but because humans were making too much noise and disturbing them.
The ancient gods were worshipped but not out of love. They were worshipped out of fear.