I think He cares cares about all sin
Deuteronomy 23:2 and 3 A bastard shall not enter into the congregation of the LORD; even to his tenth generation shall he not enter into the congregation of the LORD.
Isa 57:3 But draw near hither, ye sons of the sorceress, the seed of the adulterer and the whore.
Hbr 12:8 But if ye be without chastisement, whereof all are partakers, then are ye bastards, and not sons.
God DOES care, that is why there are so many genealogies in scripture.
As an aside, the concept of "legitimacy" doesn't carry any sort of disability in current canon law. It's mentioned only in passing IIRC, and that mention is only there for the sake of inheritance law in countries where civil divorce doesn't exist.
Well the church may find it of only "passing interest", but seems God takes it seriously..
[RnMomof7:]I think He cares cares about all sin
So an illegitimate child is sin?
Certainly an illegitimate child is a result or consequence of a sinful act. But so is Joseph's being able to protect his family in Egypt.
If we're going to do the clever cross-examination of the hostile witness routine (which is usually a waste of time, but whatever) let's at least exercise lawyerly care in our use of language.