However... in the discussion of "The overall goal of a game is to be fun", wargames ABSOLUTELY can be used as a counterargument to that statement and are completely relevant. Wargames are games. Wargames are not fun (for most people). Thus not all games are fun. Thus the design goal of a game to BE fun is not in fact true. There will be plenty of people and plenty of times when fun IS NOT the overall goal of the game's design.
Design of commercial TTRPGs, such as the ones that we discuss here, as opposed to the larger, undefined, "GAMES" that exist out in the universe, focus on what is fun.
This does not include "games" like wargames, punching each other until you fall down, and "Quien es muy Macho," the drinking game that involves a 20 sided die. Further, it does not include art experiments or TTRPGs wherein the expressed goal may be something different, such as a therapeutic purpose.