Here's why:
* Albus Dumbledore: Dumbledore was the previous master, having defeated Grindelwald in a duel. He was killed by Severus Snape.
* Severus Snape: Snape was the next master, having disarmed Dumbledore in his final moments. However, Snape was not a true master, as he was essentially forced to take control of the wand through treachery.
* Harry Potter: Harry disarmed Snape before he died, thus becoming the true master of the Elder Wand. This was a key plot point in the final book of the series.
It's important to note that the Elder Wand's allegiance is based on disarming the previous owner, not necessarily on the wielder's power or skill.