The people of the Book used to let their hair hand down, and the polytheists used to part their hair. The Messenger of Allah ﷺ like to confirm with the People of the Book in the matters about which he had received no command. Hence he Messenger of Allah ﷺ let his forelock hang down but afterwards he parted it.
كَانَ أَهْلُ الْكِتَابِ يَعْنِي يَسْدِلُونَ أَشْعَارَهُمْ وَكَانَ الْمُشْرِكُونَ يَفْرُقُونَ رُءُوسَهُمْ وَكَانَ رَسُولُ اللَّهِ ﷺ تُعْجِبُهُ مُوَافَقَةُ أَهْلِ الْكِتَابِ فِيمَا لَمْ يُؤْمَرْ بِهِ فَسَدَلَ رَسُولُ اللَّهِ ﷺ نَاصِيَتَهُ ثُمَّ فَرَقَ بَعْدُ