Your comment kind of implies that a strong swimmer with a surfboard and the right knowledge will pretty much never be in a situation where a riptide/undertow/current/whatever you call it carries them out too far to swim back. Is that true? (It might be, I just know very little about surfing)
Well informed local ocean | river mouth swimmers are gemnerally aware of the currents and tend to know how far out they carry and where one can get to the side to make their way back.
That said, currents are strong, people have bad days, they can panic, water can be cold .. far colder further out than might be expected and that can weaken the body.
Surfing is a whole other ball of wax; dedicated surf spots might be well offshore and require a boat or a jet ski to even reach, if those get crunched by a slab or fail there might be a whole lot of swimming to get back to shore, assumming the surf didn't get you.
This article about my beach makes it sound like, if the waves are big enough, all bets are off. Note: it's about a surfer who died, but I'm focusing on the comments of the surfers they interviewed.