He reunited with the one member of his family who didn’t want to kill him or mock him for what Ramsay did to him, and they formed an alliance with a woman who happened to have three dragons, a Dothraki horde, an army of Unsullied, and a variety of Westerosi soldiers courtesy of Ellaria and Olenna Tyrell.
The time had come for him to take a stand.
While Theon hasn’t exactly even been the bravest or most admirable guy on Game of Thrones, his remorse over what he did when he took Winterfell combined with his intention to do better after he and Sansa escaped Ramsay pointed toward a redemption arc.