Strange things can happen in elections. Some of that strangeness arises from factors related to candidates, cranky voting machines, skewed opinion polls, downright fraud, and other human and electromechanical foibles. Some of it comes out of inevitable quirks in election procedures, especially when more than two candidates are involved.
Suppose there are three candidates, Heather, Angela, and Kathy, and the election procedure calls for ranking the candidates in order of preference. The voters understand this to mean listing their top preference first, their middle preference second, and their bottom preference third.