While goats can swim in water, they typically don't choose to do so unless necessary.
Goats are capable of "doggy paddling" to stay afloat, but swimming for extended periods requires significant endurance and muscle training. Generally, goats don't need to swim to access food or shelter in their natural environments. Therefore, swimming isn't a regular part of their behavior. If forced into the water, they can swim, but it's not something they actively seek out.