Your phobias may be memories passed down through genes from your ancestors.
Memories and phobias can be passed down from one generation to another through genetic switches. If you don’t know or have any reason why you are afraid to swim, that could be it.