Skill is not one number
It is tempting to treat fighters as ranked along a single scale of ability, where the higher-ranked fighter should generally beat the lower-ranked one, but boxing skill is really a bundle of separate tools: jab, footwork, power, chin, body work, feints and more. A fighter can be excellent in several of these areas and still be specifically vulnerable to an opponent whose particular tool happens to counter theirs, regardless of overall standing.
Specific tools beating general ability
This is what the saying that styles make fights is really pointing at: a tall, awkward jabber with limited power can trouble a heavier-handed but shorter fighter not because they are more skilled overall, but because their specific tool set happens to exploit a specific weakness. Matchmakers and trainers study this constantly, because predicting a fight well requires thinking in terms of these specific frictions rather than simply comparing overall reputations.
Why upsets are not always upsets
Viewed this way, many results that look like surprises on paper are less surprising to people who understand the specific stylistic matchup involved, since the eventual winner may have always held the tools best suited to solve their particular opponent. This is one reason experienced observers are often reluctant to predict fights purely from records or rankings, preferring to ask what each fighter's tools do to the other's specifically.

