Human eyes have the same issue: if you are next to a bright light source, the areas without or less light will look much more dark. I assume cameras work the same way?
Cameras work the same way, but much much more poorly. A human eye can see multiple orders of magnitude higher range of light to dark areas at the same time. The accepted estimate is that the human eye can detect a 1 million: 1 range from light to dark in terms of photon intensity.