Fanfiction often takes liberties with the established canon. Regarding Hermione being Pansy's sister, it could be due to a hidden blood relation. There might have been a secret affair or a long - lost family member that links them. This new relationship would completely change how they interact with each other and with other characters in the Harry Potter world. It could lead to some really unique scenarios, like Hermione having to deal with Pansy's Slytherin friends or Pansy being influenced by Hermione's Gryffindor values.
Well, in fanfiction, anything can happen. It could be that a spell or some magical accident in the past led to Hermione and Pansy being sisters. Maybe a time - traveling wizard messed with the past, causing their family trees to merge in a way that made them related. It's a really interesting concept that allows for a whole new set of character dynamics and storylines to be explored.