Humans are social beings
Humans are social beings. They enjoy activities more when they do them with friends or other humans. Because online games allow people to play with others the game becomes more joyful.
Losing to a human is frustrating
Frustration is one of the emotions that motivates people to keep playing over and over. Losing to a human player can be very frustrating and this is why some players keep playing over and over. (See Why frustration is an important part of game design)
Self esteem boost
When a person defeats human players he feels more confident. The self esteem boost a person gets when he defeats a human player is much bigger than the self esteem boost he gets when he defeats a bot.
When a person plays alone he might feel guilty as a result of isolating himself from friends or people but when that person plays online he doesn’t feel much guilt because he is already interacting with others during the game.
Complex strategies become possible
When a person players against another human player all kinds of possibilities and complex strategies becomes possible. The fact that humans can do many unexpected things can make the game more exciting and very rewarding.
When a person plays alone his chance of getting bored become much higher than if he played with other players. As the person interacts with humans the excitement increases and the game becomes more additive.
Games get emotionally charged
When a person plays against human players he is very likely to experience intense emotions. The intense emotions , whether positive or negative, make the game more addictive. (See Why Do Gamers Get Very Angry?)
It’s considered a social activity
Instead of hanging out with friends a person can call them and play with them online. The fact that online games are considered social activities can make them more exciting.