As far as I know, marriage traditions are far less dictated by religion and are more societal. The tradition of a woman marrying her rapist was rather widespread throughout history, there’s even a Biblical account of a similar situation involving David’s family in 2 Samuel, which unfortunately ended in murder and led to Absalom’s revolt. Because marriages carried with them a prestige impact, and a woman who was not a virgin had diminished worth in those sorts of family politics. The rape-marriage laws forced the rapist to provide for the woman, since she was unlikely to find a husband having lost her virginity and women did not often hold profitable employment until relatively recently.
In shame-honor cultures, women are often blamed for the rape and so in those cultures the rape-marriage law shields her from retribution by family members. I believe such laws still exist in some Muslim countries.
Obviously, the human dignity that Catholicism emphasizes runs contrary to the idea that a woman is somehow diminished in worth when she is not a virgin. Also, the idea that a woman is responsible for the rapist’s actions is ridiculous and runs contrary to moral theology. Pope Paul VI voiced his support for Viola when she married her husband. Women today are more capable of providing for themselves without a husband than any other time in history, so the laws appear primitive and useless to our sensibilities.
I am not aware of anyone that says such laws have basis in the Church’s canons.