You do not need to know how to swim to go scuba diving. You bring air with you, so you can’t drown. Your buoyancy compensator device (BCD) functions like a life jacket. And you propel yourself, admittedly simplified, by kicking your legs. Too easy.
That said, I believe that my initial scuba lessons went relatively quickly because of my swimming ability. I had no problem resting at the bottom of the swimming pool, nor swimming around the deep end.
I told my dive instructor that I have always swam like a catfish. I hold my breath, open my eyes, and skim the bottom of the pool. Sometimes, I even just rest at the bottom. It seems that this translates to scuba diving quite nicely.
However, there is one big positive and one big negative to swimming ability.
The positive is maneuverability. If I see a piece of trash on the seafloor, I can maneuver to pick it up and put it in my mesh bag. I can quickly change my depth and direction.
The negative is cheating. I should rely more on buoyancy, but it is often easier to swim over or around obstacles. This uses more energy and, thus, consumes more air. I still manage to squeeze an hour out of an 11-liter tank, but I could probably be quite a bit more efficient if I stopped cheating.
I still think that swimming ability is good to know, and makes scuba diving easier to start. It is probably easier to learn good scuba habits after knowing how to swim, than to build up the courage to start scuba diving without knowing how to swim. In fact, an inability to swim seems to be the number one reason that I have heard why people do not try scuba diving.