The palentiri aren’t inherently evil. They are mere seeing stones. Sauron’s hubris led him to believe Pippin was the hobbit carrying the ring. Denethor and Saruman were corrupted by Sauron’s influence through the palentiri.