It’s fucking shitty and serves no greater purpose.
Of course it serves a greater purpose, in the eyes of those who are in favour of it, otherwise they wouldn’t want to keep/extend it.
Keeping women and girls in subservient vulnerable positions, and men satisfied and in positions of power (even if it’s only within their own home, where they get to then take their rage and frustration at having no real power elsewhere out on their wives and children), is what the patriarchy is all about.
It also serve capitalism, in that the girls in these marriages are much more likely to be kept in the abusive relationship and have more kids than average, kids who will become workers (E: with both parent and children being home schooled by their respective parent or “educated” by the church, making them more easy to manipulate and exploit).
It also serves christofascist white supremacy, which has manufactured racist nonsense like “the great replacement” theory to ensure fundamentalists only marry and reproduce within the group, ensuring its survival.
None of these things are bugs, they are features of these systems, and until as a society we confront that, we will never be able to tear them down and be free.