Spoilers for The Walking Dead Season 8 finale follow. While Eugene has been the most traitorous of all of the survivors on The Walking Dead, he hadn't really turned his back on Rick's group. In the Season 8 finale of The Walking Dead, Eugene betrays the Saviors by creating faulty bullets. Without Eugene's double-cross, the Hilltop warriors would have all died. Even if you have been hating on Eugene for switching over to the Saviors, you have to concede that he might not be so bad after all. So Carl's dying vision of Eugene living in peace with Rick and Judith may actually come true.
Before the season finale, Eugene's behavior appeared to be particularly despicable. But his vomiting on Rosita turned out to be for a greater purpose. Sure, Eugene probably could have just informed Rosita and Daryl about his double-crossing plan, but he played his plot to produce malfunctioning bullets close to the vest. He reveals to Rosita in "Wrath" that he came up with the plan after Father Gabriel was purposefully inept at making bullets. And it seems that Rosita and Daryl attempting to capture him was what pushed him over the edge in his decision to betray the Saviors. "Ergo, I created a modicum of phooey for a full kablooey," Eugene says, in his typical fashion.
Although many viewers were pleasantly surprised by Eugene's massive betrayal — especially since it ensured that characters like Rick and Michonne survived — other fans had predicted this outcome. As Fansided's Undead Walking page outlined, it seemed very possible that Eugene was going to betray the Saviors. There were plenty of hints. For instance, Eugene was the one who facilitated Sasha killing herself in the Season 7 finale as a way to help Rick's group.
It seemed that Eugene had become an entirely different person since last season though. But the Season 8 finale included some clues that he hadn't changed that much deep down. In hindsight, it's too obvious a stunt to have Negan test one of Eugene's bullets on a Rick dummy. And when Father Gabriel escapes the Savior convoy, Eugene's words to the priest about faith hint that he has a plan to ensure their old group will survive.
If Eugene had never agreed to create bullets in the first place, then the Saviors would have been incapable of fighting the Hilltop group. But Negan is not one to go down without a fight and he surely would have come up with another solution to take on Rick. So this betrayal actually ends up being the best case scenario for the warriors of the Hilltop. That said, Rosita still has every right to punch Eugene as she does for vomiting sardine mac and cheese on her.
As for the future, Eugene has most certainly earned back his place with his original group. And that's mighty remarkable considering how despicable he has been in Season 8. It's unclear if he will decide to stay at the revamped Sanctuary now that Negan has been imprisoned by Rick and Michonne. But due to his actions, he could relocate to the Hilltop. Rosita certainly wouldn't turn him away. On the Talking Dead episode after "Worth," Christian Serratos hinted that her character would always be a bit forgiving of Eugene — and that was a week before the audience found out that Eugene was still on Team Rick.
Wherever Eugene lands in Season 9, the communities have a plan to work together to ensure their survival against the walkers now. So he'll be able to use his scientific mind for the benefit of all humanity — not just one side or another. And in an otherwise relatively anti-climatic season finale, Eugene somehow provides the biggest surprise — and the biggest redemption arc.