A camera in automatic mode will evaluate the entire scene and choose the exposure automatically. If the entire scene appears too dark, the camera will increase the exposure. If the entire scene is too bright, it will decrease the exposure.
If the intended object is small, bright, and on a dark background like a sunset, changing zoom will affect the overall brightness of the entire scene. The automatic mode might choose an incorrect exposure. It is the source of much flat-Earth misinformation & can be corrected using manual exposure.