If the point of all of it was for the mutant gene to be restored, that meant the Phoenix going to Hope. The P5 never surrendered the power to her, and according to Wanda none of them were strong enough to. The only option as far as any of them knew was to beat the Phoenix out of them. And it worked... freed the P5 from the Phoenix, and allowd Hope to restore the mutant gene.
"That's a very nice school you have here, it'd be a shame if someone dropped some Sentinels on it"
Holding out for a Peter/Miles team up.
The X-Men got beat up and then thrown in jail, that doesn't seem much like winning to me. The real winner in this whole thing is of course Wanda, who stepped out from limbo to reclaim her rightful place as leading lady of the Avengers, and by extension, the entire Marvel universe.
"...Doom's enemies have not the mettle to challenge him host to host, tooth to nail... As economic and military options fail them, they resort to simple rudeness."
In order for things to get fixed, Hope had to get out of Utopia and help from the Avengers. That's what needed to happen, and that's what happened.