1 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.
2 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)
3 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.
4 Reduced guilt
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.
5 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.
6 Reduced boredom
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.
7 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?)
8 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.