F1 has never been about who is the best driver to get on the grid. It is who has the most money.
I've seen other reports that Perez will be back because he brings $30m worth of sponsorship money with him to Red Bull. Essentially paying all his salary and a bit more.
And where there isn't huge money there are other conflicts. Like when Piastri went to McLaren he drew the ire of Toto Wolff. In any other sport it would be strange for another team to talk how other teams are run, but behind the scenes Wolff is also on the "management team" of many drivers and probably was trying to get the McLaren seat for one of his own guys.
Teams have their own driver programs and want to sign the next Verstappen or Hamilton and the way to do that is show loyalty to the guys you have. So you see a guy like Logan Sargeant get a seat despite never actually showing himself to be in the truly elite level.