this is because allah would never change his favor that he bestowed upon a nation until they change what is in their hearts. allah is hearing knowing.
ذلك بأن الله لم يك مغيرا نعمة أنعمها على قوم حتى يغيروا ما بأنفسهم وأن الله سميع عليم