The brain is incredibly complex and things just go wrong sometimes, but scientists have managed to create effective medications... with the help of a few happy accidents.