when moses said to his people o my people why do you hurt me although you know that i am gods messenger to you? and when they swerved god swerved their hearts. god does not guide the sinful people.
وإذ قال موسى لقومه يا قوم لم تؤذونني وقد تعلمون أني رسول الله إليكم فلما زاغوا أزاغ الله قلوبهم والله لا يهدي القوم الفاسقين