At the simplest level, video games are made to entertain the person playing them. That single goal sits underneath almost every design decision, from how hard a jump is to how quickly a new area opens up.
In practice the reasons are layered. Some games are built to tell a story, others to test skill, others to give friends something to do together. And because making a game takes a great deal of time and money, the commercial side matters too: studios need players to enjoy the result enough to buy it, keep playing it and recommend it to someone else.