What is the use of game mode class?

I have read docs stating it should be used to define rules for the game but that can also be done using a actor class.
I can create a specific actor class for saving all the variables required for the game .I am new to ue4 development and I can’t able to find a reason to use game mode class.

the game mode also defines which classes to use for defaults such as default pawn, player controller, and hud, among others. its also a good thing to use for functionality that is used across many levels. imagine you have a turn based game wouldnt it be nice to have one place that tracks and controls whos turn it is, the win condition, and basic game functionality.

yes you could make a actor that holds all kinds of data and place it in the level but its probably much easier to get a reference to the game mode. you also mentioned using a actor to save variables for your game but a actor doesnt persist across levels so you would actually want to save certain things in the game instance.

this may not be a great explanation but the game mode has its own functionality which is helpful and convenient. its not somethign you need to make use of at all but its there if you want to use it.