There seems to be some sort of informal tradition that states that a large bureaucratic state needs to have some eunuchs around to grease the wheels and generally be mid-level administrators.
So how did eunuchs get typecast into that role and were they really as common as they seem in media?
Have an old answer from /u/caffarelli while you wait:
https://www.reddit.com/r/AskHistorians/comments/5x78wt/did_the_bizarre_practice_of_turning_men_into/