So, I was browsing here and found a post which supposedly said that Yudhishthira gave female slaves to a bunch of Brahmins. Slavery is obviously immoral and is even condemned in several scriptures so I struggle to think why Yudhishthira would do this. Can someone help me out?
Slavery is obviously immoral and is even condemned in several scriptures...
It seems like the rest of the world, the dharma śāstra writers of Ancient and Medieval India, did not consider slavery to be immoral. I don't know which Hindu scriptures you are referring to, but I'm yet to find a single one which condemns slavery outright.
The Manusmṛti lists 7 kinds of slaves:
dhvajāhṛto bhaktadāso gṛhajaḥ krītadattrimau |
paitriko daṇḍadāsaśca saptaite dāsayonayaḥ || 8.415 ||
There are seven kinds of slaves—(1) captured under a banner, (2) slave on food, (3) born in the house, (4) bought, (5) presented, (6) hereditary, and (7) slave by punishment.—(8.415)
bhāryā putraśca dāsaśca traya evādhanāḥ smṛtāḥ |
yat te samadhigacchanti yasya te tasya tad dhanam || 8.416 ||
The wife, the son and the slave,—these three are declared to have no property; whatever they acquire is the property of him to whom they belong.—(8.416)
The Nāradasmṛti lists 15 kinds of slaves and the work usually assigned to them:
2. The sages have distinguished five sorts of attendants according to law. Among these are four sorts of labourers; the slaves (are the fifth category, of which there are) fifteen species.
5. Know that there are two sorts of occupations; pure work and impure work. Impure work is that done by slaves. Pure work is that done by labourers.
6. Sweeping the gateway, the privy, the road, and the place for rubbish; shampooing the secret parts of the body; gathering and putting away the leavings of food, ordure, and urine,
7. And lastly, rubbing the master's limbs when desired; this should be regarded as impure work. All other work besides this is pure.
25. Thus have the four classes of servants doing pure work been enumerated. All the others do dirty work and are slaves, of whom there are fifteen kinds.
26. One born at (his master's) house; one purchased; one received (by gift); one obtained by inheritance; one maintained during a general famine; one pledged by his rightful owner;
27. One released from a heavy debt; one made captive in a fight; one won through a wager; one who has come forward declaring, 'I am thine;' an apostate from asceticism; one enslaved for a stipulated period;
28. One who has become a slave in order to get a maintenance; one enslaved on account of his connection with a female slave; and one self-sold. These are the fifteen classes of slaves as declared in law.
29. Among these, the four named first cannot be released from bondage, except by the favour of their owners. Their bondage is hereditary.
30. Should any one out of them (however) save his master's life, when his life is in peril, he shall be released from slavery and shall take a son's share (of his master's wealth).
So, Yudhiṣṭhira's actions (owning, inheriting and gifting of slaves) were consistent with the dharma śāstras.
Also, as I discuss in this answer, even Rāma and Bharata gifted slaves to brāhmaṇas during their time.