When he was still a boy, Salazar Slytherin created something akin to a horcrux. It was a ritual that stored part of his soul in his pet basilisk enabling it (his soul) to survive after his death. He would get reborn after the monster's death. It was a way to see how the future turned out for wizards and witches, to see if his descendants survived, of they continued his and his friend's legacy. What he found was a world in chaos, where wizards used his name and (supposed) ideals for dark deeds. For murder, discrimination and all the things he and the other founders had fought against.