The reason is fairly obvious: due to the circumstances of the moment back in the summer of 2020, Biden had no other choice than to pick a black, female VP - and Kamala was pretty much the only one with the sufficient stature as a sitting senator. So now they were stuck with a VP and heir-apparent who was an awful politician. The calculus was that Biden, as a milquetoast old white man, would not trigger and energize Trump's (in their eyes) racist and sexist base as much and would, with the benefit of incumbency, stand a better chance at winning the 2024 election than her, even if he was at 90 or 80% of his powers.
The hope was that if they streamline the primaries to make sure that nobody calls the emperor out for having no clothes, Biden could limp across the finish line. Past that point, they didn't care anymore, he could drop out in favor of Kamala anytime and she would become POTUS without having to face the voters.
Unfortunately for them, Biden's mental decline began to accelerate around the same time, so that their whole strategy became increasingly untenable. After his disaster debate, the DNC decided to cut their losses and try their luck with Kamala, which was definitely the right move. Yes, she lost, but with her as their standard bearer, they were at least able to reduce the damage and come out of 2024 within striking distance.
And bear in mind the total hubris and authoritarianism of the political operatives masterminding this. In 2016 the controversy was that they let Hillary have controls over the DNC apparatus like scheduling, mailing lists, fundraising, etc to suppress progressives and stop Bernie at the polls. Notably, trying to influence peoples votes with underhanded tricks. The notable part being they still allowed us to vote. In 2024 we didn't even get that. Joe Biden was forced out of the race against his own will even though he was the man the voters had chosen in 2020 and 2024. Kamala was simply given the ticket by the party's shadowy power brokers, the primaries were a farce and even though they had time to let Biden drop earlier and hold an open primary.
They chose to cut their losses and go with Kamala. They chose to disenfranchise the people and disrespect the very concept of democracy. Its a running theme for the neoliberal world. Romanian just held its third election after overturning 2 where the right wing won, and banning their candidate. Now they can support Ukraine with a pretense of democracy. Germany moves to ban the AfD, France locks out the FN, and every western country tries to imprison their political opposition. Including America, and just 15 months ago the courts were entertaining attempts by democrats to remove Trump from the ballot and Democrats trying to imprison him. Or murder him.
Its a single line drawn between those who call the shots in the party and those who would send us to secret prisons for criticizing them on social media if given power. The consistent thread is their belief that they know better. They knew better than Biden, they knew better than the voting public