Quote from : Harry Potter and the Prisoner of Azkaban Book

I was terrified they would desert me the moment they found out what I was. But of course, they, like you, Hermione, wourked out the truth... And they didn´t desert me at all. Instead they did something for me that would make my transformations not only bearable, but the best times of my life. They became Animagi. (...) They couldn´t keep me company as humans, so they kept me company as animals.