Rowling's comments on wand lore and allegiance:
She said that not in all cases wands will switch their allegiance, Wands have their affinity with their owner which in some cases force the wand to be with their owner even if he/she lost a battle with other wizard
Emphasis of the text under block quotes was done to highlight the context regarding this answer by me
"Essentially, I see wands as being quasi-sentient, you know? ... They're not exactly animate but they're close to it. As close to it as you can get in an object because they carry so much magic. So that's really the key point about a wand. Now, the reactions will vary from wand to wand. The Elder Wand is simply the most dispassionate and ruthless of wands in that it will only take into consideration strength. So one would expect a certain amount of loyalty from one's wand. So even if you were disarmed while carrying it, even if you lost a fight while carrying it, it has developed an affinity with you that it will not give up easily.
If, however, a wand is won, properly won in an adult duel, then a wand may switch allegiance, and it will certainly work better even if it hasn't fully switched allegiance for the person who won it. So that of course is what happens when Harry takes Draco's wand from him, and that's what happens when ... Ron (takes) the blackthorn wand from the snatcher. So that would be sort of rough and ready, common, or garden, a wand favoring the person who had the skill to take it. It would favor them. However, the Elder Wand knows no loyalty except to strength. So it's completely unsentimental. It will only go where the power is. So if you win, then you've won the wand. So you don't need to kill with it. But, as is pointed out in the books, not least by Dumbledore because it is a wand of such immense power, almost inevitably, it attracts wizards who are prepared to kill and who will kill. And also it attracts wizards like Voldemort who confuse being prepared to murder with strength.
During DA Practice sessions and in Dueling clubs, the wizards don't have intention in their mind to capture other persons wand, so the wand doesn't change its allegiance from its owner even if it finds a more powerful one.
"I have been asked a lot of times, well what about Dueling Club and so on? Well I think it's clear there that in practice, where there's no real weight attached to the transference of a wand, where it's almost all for fun or purely for competition, there's no enormous significance attached in either wizard's mind to a wand flying out of someone's hand. But there are situations in which the emotional state of wizards where a lot hangs on a duel, that's something different. That's about real power and that's about transference that will have far-reaching effects in some cases. So I think the wand would behave differently then." (TLC2)
Source
Here is the link of the interview transcript.