It's because it already knows.
It's because the camera knows that it is already dark or bright and will automatically choose a slower or faster shutter speed. You would not necessary have to fiddle with the camera settings at all. The camera will automatically set the shutter speed on its own. For example, while taking a picture in a darker corner of the room, the camera will choose a slower shutter speed.