Mary might be fridged, she might be a ghost, she might be whatever, but she’s what started the show: and, for a long time, the characters’ motivations. Home is not the house they once lived in: home, we all know, is where the heart is. (Or at least, you should know that. Natalie Portman and Stockard Channing were in a movie with that title.)
Home is where Mary is, and she had to be resting in peace before they could move on.
Also there’s foreshadowing and Harry Potter references and shit to do.