“whether the gods love the pious because it is the pious, or whether the pious is pious only because it is loved by the gods”
Actually, there is no dilemma:
God cannot love the pious because they are pious because this would mean He loves only those of His sort which in itself is evil.
The pious and the impious attract appropriate rewards in such a way that the pious would feel inspired to continue his pious acts and the impious would feel pressurized to discontinue his impious acts.
Thus both the pious and the impious are loved by God.