In this ultimate sense, the value of chess pieces remaining in a game does not matter.
Pieces, especially as distinguished by their value, are often referred to collectively as material in chess.
These values are not absolute because the usefulness of a piece also depends on its position in a particular game, commonly in a way hard to quantify.
In such cases, the player presented with the possibility of an exchange may decide to make the initial capture, may decline making the initial capture, or may even move to avoid the exchange.
For a prospective uneven exchange, the values of the pieces are often the deciding factor.
Positions could develop where a player's piece on a square has one or more attackers and one or more defenders.
Such tactics can involve checkmating the opponent, avoiding checkmate, gaining a material advantage, avoid losing more material than necessary, helping a pawn to promote, preventing an opponent's pawn promotion, or setting up a draw by any of a couple methods.
Some tactics can lead to draw by stalemate, threefold repetition, or insufficient material to checkmate.
Often an attacking player initiates an attack by making the first capture in a series of exchanges leading to a tactical trap; the opponent recaptures to avoid material loss but can fall prey to the trap.
For example, even if overall material count is equal in a certain situation, some players may consider that having two bishops, which can cover both dark and light squares, is advantageous over having just one bishop which can cover only half the squares, and so may exchange or avoid exchange to obtain or maintain such an advantage.
Strong players commonly play a materially even game with each other, often clearing out their pieces with even exchanges to transition from middlegame to the endgame.