Rules don’t Trump Election Laws....
It’s not an election. It’s a party process choosing a candidate for the election. Party rules are free to be whatever the party decides.
The only reason the selection is generally democratic is to get as many people to support the party.
If they anger enough people, though they get whom they want as the candidate, they will lose the election.
If enough people want something different, they form their own party.