One of the long-running conflicts for Raven in the series was that she felt very much alone, even though she was a member of the Titans. Due to her birth and "destiny", she never got to truly have friends, and even when she joined the Titans, they never "understood her".
So, when she met a wizard trapped in a book named Malchior, one that seemed to get her, how could she turn him away? Well, it turned out he was a liar, and was not a wizard, but an evil dragon creature that used Raven to free himself from the book he was trapped in. But Raven not only got wise, she used his own magic against him to trap him back in the book. And though she wouldn't admit it, she was grateful to Beast Boy for reaching out to console her.