Motivation is a tricky factor that guides the human condition. In the fitness arena motivation comes from a variety of factors and needs. Applying the Hierarchy of Needs Theory as developed by Abraham Maslow to the fitness and sports arenas is a great frame of reference. Everyone can plug into his model on single, or on multiple levels.
If you are a beginning swimmer, your ability to embark on this journey plugs you into the Physiological level of Maslow's pyramid. As you quickly adapt to these needs being met, you will also develop a sense of Safety. Safety will then provide you a sense of Belonging, and Friendship as you get to know others at your pool. If your fitness is improving in these three lower levels, you can't help but gain Self-Esteem, and Confidence, along with a healthy Respect for, and by others. Now you are swimming up the pyramid.
Ultimately you will reach Self-Actualization for your efforts. With Self-Actualization comes the ability to understand the demands required to accept your personal condition. Learning how to improve your condition pushes you to a higher level on the pyramid. As your ability to swim advances from beginner, to intermediate and beyond, the hierarchy is reinforced.
Swimming is a great journey towards better health. Understanding motivation and needs can help you stay on path.
As with many things in life, getting off the "couch" can be the biggest hurdle. Just remember Newton's Law of Motion, "An object that is in motion will not change its velocity unless an external force acts upon it." Applying a little theory to your training can go a long way. Keep training and your swimming experience will blossom.