Initially, court eunuchs were quite lowly in status, and constituted menial servants and attendants. Having "access to the body" of the Imperial family would have been a tremendous advantage for schemers among the nobility, and so eunuchs were seen as far more neutral in that respect. As a result, when they wielded influence, it was by speaking with the voice of the Emperor.
Eunuchs rose to prominent power in the First Eunuch Era. The Empress Dowager had taken over the government, using gifts and grants of titles to make the Imperial family loyal to her. With no one else to turn to, the young Emperor Liu Zhao promoted the only people who he had formed personal bonds with - his eunuchs - to positions of power, and plotted with them to dismantle his mother's control. The eunuch Zheng Zhong was granted a marquis's title for his help.
For his part, Zhao Zhong (one of the two most prominent eunuchs among the Ten Attendants) was granted a title of marquis in a similar way, by helping his emperor execute a coup against a powerful general.