The backstory of Pennywise is tied to an ancient cosmic entity referred to as the "It" or the "Eater of Worlds." This entity is from another dimension and has existed for an extremely long time. It comes to Earth approximately every 27 years to prey on the children of Derry. He/It didn't turn evil it simply is evil.
Pennywise, the antagonist in Stephen King's novel "It," is a fictional character known for preying on the fears of children. In the story, it is suggested that Pennywise feeds on the fear of its victims, and the consumption of flesh is a part of its malevolent nature rather than a necessity for sustenance.