in medieval times, abnormal behaviors were viewed as a sign that a person was: possessed by demons
The people in medieval times haven't understood the concept of psychological disorders, so they perceive everyone who got it as being conquered/possessed by demons