Agree with all of the above comments.
It can happen to anyone. Not confined to newbies. Everyone gets caught sometime.
I think the problem comes from being caught up on the harness line while mid-gybe and then being thrown forward and sometimes depending on the severity, being spun at the same time. This causes the harness line to twist onto the harness hook and makes getting free very difficult indeed, more so when you are underneath the sail in waves.

It has happened to me twice in one day. The first time I got out OK, but the second time the harness line twisted and I couldn't get free. So doing my best not to PANIC while holding my breath, I spun myself in the opposite way to how I was thrown and the line released me (all the while being pushed along by the wave). Think it was more good luck than good management.

Called it a day after that. Don't like the idea of drowning that much! The quick release harness has a lot going for it, especially when in surf.