I'm going to compare Pokemon to my dog, in a sense.
My dog is a Border Collie, and are considered a very instinctive and loyal breed. They are mostly used to herd cattle and sheep, but when domesticated have been known to attach other "jobs" to themselves. Mine happens to love playing fetch with the ball. He and I could throw the ball back and forth for hours and he will keep coming back. We literally have to yell at him to get him to stop. Even when he broke his hip, he still tried to play ball even though it physically hurt him. Why would my dog do something that was physically causing him pain?
The answer lies within his animal instinct. He is a breed that was meant to please his master no matter what. How can he please his master when he is a simple house pet? He plays. He gets gratification from playing. He gets exercise when he plays. My family adores him when he plays. He does it because to him, that is his purpose in life. His drive to live is ball.
The same probably goes for Pokemon. Pokemon battle because it is their existence. Their job is to use the powers that come naturally to them. They like using trainers because it allows them to grow in ways that wouldn't be possible otherwise. Pokemon battle because it's in their DNA to battle from Arceus, Mew, to Bidoof. They all want to be stronger, and they use trainers as a means to complete this goal.