At the time Grams was very worried about the girls: Phoebe especially was a real problem child - getting in trouble with the law and refusing to listen to her family; while Prue was distracted by her upcoming marriage (it didn't happen!) and Piper was fed up with her job. Grams became convinced that they weren't capable of coping with their powers (which the girls themselves at that time still knew nothing about) and prepared a potion as part of a plan to stop them getting them. She died just as she was about to cast the necessary spell.
Back in the future, Piper finds Grams' potion and feels closer to her sisters than ever. She tells Leo at the last moment that she doesn't want to leave and he reluctantly agrees with her. In a display of family solidarity, Prue gives the married couple her larger room while Phoebe agrees to let them have a bathroom all to themselves. Sorted!