that was because there came to them their messengers with bayyinat but they said shall mere men guide us so they disbelieved and turned away. but allah was not in need. and allah is not in need worthy of all praise.
ذلك بأنه كانت تأتيهم رسلهم بالبينات فقالوا أبشر يهدوننا فكفروا وتولوا واستغنى الله والله غني حميد