If you want to take someone sailing on a boat and you ask them if they can swim, what exactly are you asking? Everyone can float if they have a life jacket right?
My understanding is that someone is being asked if they can take care of themselves and/or tread water until they are rescued and/or if they are a strong swimmer, but I could be wrong.
As someone who sails with absolute goofballs, people don’t wear jackets, boats flip, stuff falls out etc all the time. It’s fine to not know how to swim, we just need to know ahead of time so we can prioritize things when it goes south.