The fall of the Han Dynasty in China came about because a group of eunuchs were the de facto rulers of the empire and warlords wanted to restore said power to the emperor, culminating in the Three Kingdoms period. Eunuchs were always kept around in Asian courts because it was believed they wouldn’t have a drive for power, since they couldn’t have children in order to start their own dynasties.