The goal of chess (clearly) is to win the game - to capture your opponent's king. It is a complex and subtle game, and winning the game may involve non-obvious strategies - pulling back at unexpected times, sacrificing pieces and so on.
No human (or, as yet, computer program) is capable of seeing right to the end of the game to play 'perfect moves'. Instead players tend to look ahead some number of moves ahead, and choose the move which they think puts them in a better position. They judge this by the static evaluation function which usually includes things like
The static evaluation function is a short term approximation of the utility function. Actual utility is winning the game, but as an approximation, losing pieces is negative utility, capturing opponent's pieces is positive utility, controlling the board is positive utility, and so on.
There is an analogy here with emotion.