When Allah fashioned Adam in Paradise, He left him as He liked him to leave. Then Iblis roamed round him to see what actually that was and when he found him hollow from within, he recognised that he had been created with a disposition that he would not have control over himself. (Using translation from Muslim 2611a)
قَالَ رَسُولُ اللهِ ﷺ إِنَّ اللهَ لَمَّا صَوَّرَ آدَمَ تَرَكَهُ مَا شَاءَ اللهُ أَنْ يَتْرُكَهُ فَجَعَلَ إِبْلِيسُ يُطِيفُ بِهِ فَلَمَّا رَآهُ أَجْوَفَ عَرَفَ أَنَّهُ خَلْقٌ لَا يَتَمَالَكُ