We use until about something that extends over a period of time up to some event.
Getting married is regarded as an instantaneous event, being married or not being married is something that extends over a period of time.
Sentence 1 is about not being married, which extends over a period of time, so you can use it with until.
Sentence 2 is about getting married, which is an event, so you can't use it with until.
leave (in the sense depart) is an event, but not leave (in the sense stay) is a state that can extend over a period of time so sentence 3 is valid but sentence 4 is not.
leave (in the sense leave alone) is valid over a period of time, so this is valid:
You can leave it until later
Your sentence 4 would be valid if used stay, which is valid over a period of time, rather than leave:
She can stay until she finishes