That's because it's a representative process. It's never been a direct democratic vote. According to the rules, the delegates don't have to follow the way their district/state voted.
YOU GUYS ALWAYS SAY; BUT THEN YOU LET THE DEMOCRATS PICK A CANDIDATE FOR THEMSELVES; TRUMP IS A THREAT TO DEMOCRACY; WHO DIDN'T GET ANY DELEGATE VOTES AT ALL