The youngest son was born when the emperor was very old, and the threat to the imperial power was very small. So from this point of view, the emperor would prefer the younger son to the older son.
Secondly, to some extent, the eldest son is usually married by a woman appointed by the emperor's father. There is a certain interest relationship between the emperor and his wife, so just as the emperor doesn't love his wife very much, he doesn't like the eldest son born to his wife, and the youngest son is usually born to the emperor's favorite concubine. Love me, love my dog, I will definitely love my youngest son more.