Answers to this question have been suggested have been given a few centuries before A Song of Ice and Fire was written:
Not now to hear thee sing; I take no pleasure
In aught an eunuch has: 'tis well for thee,
That, being unseminar'd, thy freer thoughts
May not fly forth of Egypt. Hast thou affections?
Yes, gracious madam.
Not in deed, madam; for I can do nothing
But what indeed is honest to be done:
Yet have I fierce affections, and think
What Venus did with Mars.
So, while they cannot service their affections in deed, they may service them indeed. (And indeed, in deed, since George R. R. Martin allows his characters a sex-life less focused solely on penis-vagina penetration than Shakespeare did Mardian).
(That's assuming that Mardian was even lacking in a penis as well as just testicles. In the days when castrati still sung, they had an advantage in illicit affairs in that not having testicles is a very reliable form of contraception).