I think the reason why Rey beat Kylo Ren was because he didn’t want to kill her. He was owning her in the first half of the fight, and as we see, he wants her to become his student.
In the second half, Rey kicks his ass because he wasn’t expecting her to do such a crazy fast counter-attack, and before he realizes what’s happening the fight is over.