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.
If the boat goes down you could need a life jacket to stay afloat longer than you could swim. But it would also be helpful if you can make your way through the water in a purposeful direction. Ideally everyone wears flotation gear just in case. But it’s especially important for a person who isn’t a good swimmer. Or at least fat enough to float, like Pippi Longstocking’s father.