She consented to the marriage.

Literal

She [topic-は] that marriage [to-に] consented.

~に同意する ('to agree to / consent to X') uses に to mark what is being agreed to — a proposal, plan, or arrangement. The phrasing carries weight; in everyday speech you'd more often hear casual 賛成する or just 賛成 ('I'm in favor'). 同意する fits contexts where the agreement has legal or social heft — exactly the register of marriage. Underneath the simple sentence sits the cultural reality that for most of Japanese history, marriage required (or at least sought) family consent. お見合い (formal arranged introductions) and the heavily codified vocabulary of marital agreement are increasingly rare today, but the formal verb 同意 still echoes those traditions.