These hadiths basically mean that those who would buy female slaves and have children from them, then if they did not pay the Khums to the Imams, the slaves would not be lawful to them. So in reality their children were not legitimate. This doesn’t mean they are punished for Zina in Islamic law. If you go by the apparent situation, it was a valid relationship, but in reality it wasn’t because they didn’t fully own the slaves (only 80%).
Or it could mean that they divorce incorrectly. The Qur’an states there must be two just witnesses at the moment of divorce, and the Prophet (s) made that clear. They don’t believe this is a mandatory condition. So the divorce in reality is valid, and then the wife remarries another man when she is technically the wife of the previous husband.
But as for the Shia, their birth is pure because the Imams relieved them from paying Khums on slaves, and their divorce is according to original Islamic Law.