Exposure compensation adjusts the tonality of the photograph while the photograph is being made in camera.
In an automatic exposure mode, exposure compensation is adjusted automatically based on what the photographer sets as the exposure compensation and the light intensities influencing the light meter in the camera.
I manual exposure mode, exposure compensation is adjusted only by the intent of the photographer.
I’m a proponent of the latter approach.