The Chorus in the Prologue states their deaths serve to "bury their parents' strife":
"From forth the fatal loins of these two foes
A pair of star-cross'd lovers take their life;
Whose misadventured piteous overthrows
Do with their death bury their parents' strife."
Their sacrifice transforms private tragedy into public reconciliation. The Montague-Capulet feud—ancient, senseless, destructive—ends only when the cost becomes unbearable. The lovers' deaths are the price of peace.
The Prologue frames the entire play: we know the ending from line 6. The tragedy isn't what happens but how it happens—and what it means. The purpose is announced before the action begins: love's power to heal hatred, even at the cost of the lovers themselves.