The quick explanation is that team principal Andrea Stella has done an outstanding job of turning McLaren around since his promotion from performance director in the winter of 2022-23.
Stella and chief executive officer Zak Brown reshuffled the technical department that winter, as progress was not going as planned. They spoke with the media in February 2023 and were open about their situation.
The crew had missed its development goals and discovered several promising aerodynamic paths too late, they claimed. The season would start out slowly, but in the summer there would be an upgrade, and then another. That would put McLaren back in.