The young man whom Khadir killed was a non-believer by his very nature and had he survived he would have involved his parents in defiance and unbelief.
قَالَ رَسُولُ اللَّهِ ﷺ إِنَّ الْغُلاَمَ الَّذِي قَتَلَهُ الْخَضِرُ طُبِعَ كَافِرًا وَلَوْ عَاشَ لأَرْهَقَ أَبَوَيْهِ طُغْيَانًا وَكُفْرًا