Nope, it's not because of the body absorb water while swimming. The need to urinate more when or after swimming is due to mammalian dive reflex, which in turn induce immersion diuresis and consequently urination.
Mammals like us humans,breathe using our lungs, unlike fishes and marine creatures who usually breathe through gills. Thus, we and aquatic mammals like dolphins, whales, sea lions and even other land mammals who jumped into the water are blessed with this natural reflex called mammalian dive reflex (MDR), telling our bodies to work efficiently in or underwater. There are 3 major things that triggers MDR :
- Facial submersion - little nerves on our face detect when it's submerged in water,it turns on MDR
- Pressure - when divers dive down just 1m underwater there's changes of pressure detected
- Breath hold/ apnea - when mammals dive, they hold their breath, this trigger MDR
Now what MDR does is it gonna make us function more efficiently for the task at hand, especially when the water is cold or colder than your core temperature. The blood vessels in our extremities (like your arms and legs, fingers) will shrink, and oxygenated blood will be more in our vital organs which are heart and brain,because that's where the oxygen is more needed to keep your survival. This makes the blood volume in the heart increase. The body needs to regulate blood volume, so the brain took this signals as it has too much water in there, so body draw out water from your body and that's why you need to pee.
Now, in swimming, you may not feel so much pressure because you don't dive down, but the other factors are enough to trigger MDR. Apart from that, as another answer states, the sense of weightlessness also induce diuresis, in swimming, buoyant body give your brain sense of weightlessness. So those are contributing factors of why you urinate more after swimming than other sports.