How the auto exposure works?

Hello, i am trying to understand better the auto exposure mode in Darktable, if the images are underexposed mostly the auto option is good, but if the image is exposed ok or maybe overexposed, it darkens the images like 2 ev.

there is a way how to balance this?

Regards

Sebastian