I certainly don't envy the decision makers in F1.
It used to be a sport of (for want of a better word) 'Men'. Drivers had proven themselves in other series would get their shot at Formula One, run for a few years and either win, or move on (alas, many died).
Then we success with young drivers in Alonso, Hamilton, Kimi and Vettel. Suddenly F1 wasn't about having proven men, but instead young kids with potential. Max proved that waiting until a driver had full cabinet of trophies was waiting too long. We got Norris, LeClerc, Albon and Russell in response.
Then something changed again. F1 cars were temperamental, the kids weren't beating the established drivers. It appeared that experience was more important than potential. Someone with maturity to lead a team instead of a wide eyed risk taker was what F1 needed.
Now in 2024 we've seen that there is no 'right' way to fill the seats in an F1 car. Norris winning as a veteran, Piastri winning as a young gun, both on the same team in the same machinery. McLaren split their bets, and... they both won.
As if this wasn't obvious with Hamilton, and Verstappen having success both as young guns and as veterans. With Alonso constantly being seen as a great driver despite his age and team. Good drivers are good drivers, no matter their age. It's up to the teams to decide if someone is developing, like Norris, or ready now, like Piastri.
(And of course there's sponsorship deals. If you can't find a winner, and have to choose between two pretty good drivers, why not take the one with massive sponsorship deals with entire countries? If you're not going to win, might as well earn those extra millions)