Apathetic_ghost is right. Check out the "china" heading under the eunuch wikipedia article.
https://en.wikipedia.org/wiki/Eunuch
It definitely says, "In China, castration included removal of the penis as well as the testicles (see emasculation). Both organs were cut off with a knife at the same time.[34]"
Well, when men lose their testicles, they also lose access to horomones that trigger puberty. That means their voice stops changing and they don't grow facial hair etc. For this reason, Eunuches never had very long lives. Would keep them young and "beautiful" if done young.
But I think the real reason they tool both the testicles and the penis is so there would be no temptation for the eunuchs to sleep with women in the Harem or to seize power by starting families.
They castrated rapists as punishment (forgot which dynasty). During war they would castrate civilians, usually young kids, to use as palace slaves. There are also cases of men naturally born without a penis. But most chose to do it to enter the palace, because if you play the cards right you can get pretty rich.
I really hope that it’s a translation error and not a mistake on the authors part but guys please know that eunuchs have their balls removed not their penises. Please just know that.