Games can use many psychological tricks to persuade you to keep playing, even when the game ceases to be fun. One way they do this is by making you feel like you have
invested in the game, which makes the game feel more valuable to you. If your copy of the game has more powerful items unlocked or is otherwise customized for you, then it is hard to throw that away.
Another technique that games use it go give artificial goals for you to accomplish. This may be
badges to earn or things to
collect. People are more likely to remember a partially completed goal than a complete goal, so they are more likely to return to the game to make progress on the goal that was arbitrarily set for them.
Games manipulate our subconscious by giving us the
illusion of control over the game environment. The game may cheat or make us feel like we are more skilled than we actually are. If we feel more empowered (even if we aren't) we are more likely to play. Games often give us
variable rewards for achievements in the game. These unpredictable and random payouts trigger our brains to keep playing for a chance at a big reward.
Some games use
aesthetic manipulations to trick us into accidentally doing something that we normally wouldn't have done. They can also use our brain's bias towards
recent and memorable events to make us think that the odds of winning are higher than they actually are.