"Unwholesome" may have been a poor choice of words, perhaps 'unlikely' would have better.Not sure why one would zero in on the listed women's being "unwholesome." What about the many listed men who were? Or Leah, who's not listed despite the notorious way she entered the lineage?
There were women unlikely to hold a prominent place in the Messiah's lineage, or at least unlikely to be mentioned.
Find another biblical genealogy that mentions a number of women - it's rare
Matthew included these women for a reason
He picked women who did not hold a high position in Jewish culture, unlikely candidates of faith - and yet there they are!
God lead the magi to worship the infant Jesus
God picked you and me too, unlikely characters.
Go, therefore, and make disciples all nations (Matt 28:19)
Rob