The party nominating system is not a direct democratic system. It is a political process established by the parties. Trump was a beneficiary of that system in 2016. Trump won most of the early primaries by a plurality of 30-40% of the vote (lost TX to Ted Cruz). But he shot into the lead on pledged delegates because the primaries are winner takes all contest. That in and of itself is not democratic in that a majority of voters opposed Trump in the early primaries. Had Republicans organized against Trump the way Dems did against Bernie in 2020, he would have probably lost the primary to Cruz or Rubio. But since both candidates stayed in, they essentially handed Trump a plurality win in the primaries.
Biden and the Dems are operating under the same system except instead of getting a nomination by a plurality, Biden is exercising the right of any candidate pledge their delegates to another candidate. The Dems may open up the convention to other challengers to Harris, but that process is entirely the party's prerogative and does not require any participation by the voters.
Is this a stupid process? Yes. It is. The primaries should be a nationwide ballot with a runoff of the top two vote getters if there is no 50%+1 winner. That would be democratic. The primary system has never been democratic for either side.