I think someone gets a random bye
No, some players get thru the first round without having to play anybody. Then it plays out 128 > 64 > 32 and so on until there's a winner.
Well for a 138 entrants tourney, 20 players must play heads up to qualify for the first round right?
Yes, and 10 of those go thru to the round of 128, then full rounds will be played for the rest of the tourney. It's just unlucky for those 20 that they have to play an extra match.