Outwith, please do look at the context; and also a more modern translation. Here is that passage in the New Standard Revised Version - widely taken as the standard, accurate translation of the Bible:
Do not be mismatched with unbelievers. For what partnership is there between righteousness and lawlessness? Or what fellowship is there between light and darkness? What agreement does Christ have with Beliar? Or what does a believer share with an unbeliever?
In Paul Righteousness always means 'living in accordance with God's law'. So the passage is all about the difference between those who follow God's law and those who don't, between those who follow the light of the world and those who are still in darkness, and between those who follow Christ and those who serve false gods.
And bear in mind that Paul has just been talking about the cruelties inflicted on the early Christians by the authorities :
as servants of God we have commended ourselves in every way: through great endurance, in afflictions, hardships, calamities, beatings, imprisonments, riots, labors, sleepless nights, hunger;
For these early Christians we're put in great danger by their faith, but Paul urges them to repay this treatment with
purity, knowledge, patience, kindness, holiness of spirit, genuine love, truthful speech, and the power of God; with the weapons of righteousness for the right hand and for the left; in honor and dishonor, in ill repute and good repute.
Then he goes on to ask what partnership there can be between believers and unbelievers - in the context of a situation where believers are being persecuted for being followers of Christ.
When you read the passage in context, and in a good translation it doesn't appear so cruel. Again this is the problem with proof-texting and cherry-picking.