Harris ran a very left-of-center campaign in the 2020 primary election, and soundbites from that were played on repeat in 2024 (some of which didn't age well and some of which were always unpopular in certain circles). That that would happen was an easily foreseeable consequence of making her the candidate. The incumbent party could have chosen a different candidate if they had made an earlier decision to not try to re-elect the president.
You can't cure the disease if you get the diagnosis wrong.