We are assuming the rape in this case was statutory and the act was technically, although not legally, consensual.
The idea that a rapist is somehow exonerated through marrying the victim is found in the Old Testament. The logic (if you could call it that) of the Bible in forcing marriage upon the victim is thus:
1) Dude. If you want her that badly, then she's yours. Apparently, they believed that the constant reminder of his act would be more of a punishment to him than to her. Not that a womn's feelings were considered anyway.
In no way would I advocate a 'biblical solution'. (Atheist here.) However, I know a couple who married a few years after the man was imprisoned for having sex with the girl. After years of marriage, he is still required to register as a sex offender even though he married the 'victim'.
It is difficult to measure the level of pressure or emotional force that a chronologically older 'adult' might or might not wield over a 'minor'. However, the law doesn't have time to split hairs over this or to forgive, in the face of rampant child sexual predation and rape, those cases where the end result turns out better than we might expect. The courts may be bureaucratic and mysterious, but they operate for the greater good.
Perhaps there should be special way to petition in the courts in these cases.
2) In those times, a violated woman would be difficult to 'husband'. So, they figured her rapist would have to do.
3) Parents might want to cover up the crime to throw suspicion off their daughter and save the family's reputation.
Crazy worlds spin faster!