Snape ensured that Draco and Harry, who hate each other, learned to duel under conditions of genuine hostility by pairing them as opponents. He ensured that they learned Expelliarmus. He ingrained disarmament into them so that in moments of mortal pressure, it would be their default magic.