Mr. Darcy was an aristocratic, arrogant & flawed man.
Elizabeth rejects his proposal first because Darcy broke up her sister's (Jane) marriage. But when Darcy persuades Wickham to propose to Lydia for marriage. Even Darcy offers money to Wickham for this marriage. Elizabeth learns what he did, then she agrees to reciprocate his feelings. During her visit to Charlotte and Collins's home, Elizabeth runs into Mr. Darcy and is shocked to hear him confess his love for her.
Elizabeth's love for Mr. Darcy is obscure in the novel but portraying the cinema shows extravagantly love between them.
According to Jane Austin "A lady's imagination is very rapid; it jumps from admiration to love, from love to matrimony in a moment.”
Maybe that's why Elizabeth agrees to marry Mr. Darcy when whispering persists among other sisters of Elizabeth that She doesn't love Mr.Darcy.