In SA2/SA2B, there are several scenes from the ARK where you can see the planet which, if it's not Earth, looks a lot like Earth in that it has a lot of water. So if the planet that the ARK orbits is a water covered world, and a genious scientist creates the Ultimate Lifeform, doesn't it make since that Shadow would have been created with the ability to swim? Or if he wasn't CREATED with the ability then I'd think that he'd have at LEAST been taught.
Further evidence for this is in the Olympic Games. On the aquatic events, Shadow actually swims using the crawl style of swimming while sonic has something called "underwater running" and even wears a life jacket.