That's not entirely true. In 2020, a lot of states just cancelled their Republican primaries and pledged their delegates to Trump. Mainly because it's assumed that the incumbent will be the candidate.
And all-in-all, that's fair play. The GOP and DNC are private entities and they get to choose who they put forward as a candidate in the manner they choose. Voting in presidential primaries is fairly recent. The DNC picked Harris, as is their right.