I still can't believe they let Perez get away with basically being an anchor on the team for the whole season.
It was probably better for Max, all things considered. If he had been pushing Max in every race, he probably would've gone completely off the rails and lost the championship as a result, and it probably suited him not to have to worry about the second driver.
Arguably it's easier when there is a clear number 1. Fighting between drivers can often get costly and a distraction. It helps when the driver is not a complete drag however.
The best scenario is what Hamilton and Bottas had. Bottas could and would routinely push Hamilton, and he would take the race home if something happened to Hamilton, but he didn't have the skill to sustain a challenge to Hamilton over an entire race. He knew it, he accepted it, and he absolutely thrived in being a complete menace to anyone who was threatening Lewis. He struggled in 2021, but he did a wonderful job prior to that. I think part of it was that Bottas was genuinely trying to win too, but that he didn't let that desire to win turn into a toxic situation within Mercedes, and if Lewis was better on a given day, he didn't ruin his race in the way that other drivers would.
The thing with Perez is that he just inexplicably collapsed in driving ability. What he did in Abu Dhabi 2021 against one of the most fearsome drivers in history was legendary, but something clearly went wrong inside him mentally after that. It might also have been an issue with Max, specifically that while Hamilton was mentally tough enough to know that he could lose sometimes to Bottas and still win over the course of a season, Max doesn't appear to have the same resilience. There are also other examples of how Lewis and Vallterri had a good relationship, like when Lewis asked to be let through by Bottas to attack Vettel for first place as Vallterri couldn't do it. He failed, so he gave the place back without complaint on the last lap.
My theory is that Perez wasn't a problem financially or in terms of fan support/eyeballs to the Red Bull brand, and that as the Constructors Championship isn't a big deal for sponsors or fans alike, they simply had nothing to lose from keeping Perez. They probably did their calculations and established that Max would still win the championship single-handedly, and that in this situation, it was better to keep Max happy rather than risk a meltdown after a new driver comes onboard and starts pushing him.
We also don't know how Perez was perceived within Red Bull by the rank and file. There are plenty of reports that he was loved by the team itself, that he had incredible personal relations with mechanics, engineers, marketing staff and so on. He's known to really put a lot of effort into his sponsors and making them feel like they've earnt every penny from their investment, and all of this combined would make him worth a hell of a lot more than most drivers.
So, all things considered, he might not have been such a drag as the fans perceive him to be. Something clearly went wrong for him, but we also don't know if Red Bull were intentionally giving him cars that were set up differently so that they could obtain data to help Max. It's very possible that his "drop-off" in form was actually closer to what Hamilton was doing with Mercedes last season.