The phenomenon you describe is called color constancy, and it is enabled partially by the human vision system's chromatic adaptation and partially by something I will describe using the scientific term complicated stuff in our brains. That may sound a bit glib, but this is actually a complicated topic with whole books just scratching the surface and significant ongoing research.
Dynamic range — that is, dealing with extremes in brightness — is addressed by several different things in the human vision system. Your eyes themselves adapt to different levels of light in various ways, from opening and closing your pupils to actually changing levels of sensitivity. And, unlike the way a camera sensor works, this isn't a global change, which is why you get an after-image when you stare at a bright light and then look away. But, there's a second component — again, complicated brain stuff. Rather than a camera-like view, your brain actually builds up a mental model of the world over time, and this includes memory/perception of different brightnesses. The dynamic range in our model is many times that of what the eye itself can process.
This process works so well that people don't realize the differences in brightness we experience every day — leading to questions like Why is my camera metering indoor scenes as darker than I expect, forcing me to use a high ISO? — it goes against all instinct to accept that sunlight is 500× brighter than a typical "bright" interior.
When it comes to color constancy, chromatic adaption explains part of the situation. But it's also important to realize that your brain is hard at work trying to make everything fit into a constant model of the world, and that includes dealing with different illuminants — light sources with different properties like color temperature. Your brain uses multiple cues to do this, and — despite all the research I noted — we aren't really sure exactly how it works. It involves our perception of the light source, our perception of the background and surroundings, memory colors, and perhaps other factors. However it happens, it means that when you're in an interior room with incandescent lamps and sunlight through a window, your brain covers for the difference in color temperature in a way that a fixed recording of the scene doesn't.
Cameras today simply do a global white-balance correction based on automatic or manual estimation of the illuminant. This can work very well when there's just one light source, but is often a mess otherwise. As far as I know, no cameras really attempt to do anything else, so when possible, photographers simply work to make the light sources match — see for example How do I use gels to make my flash match the color of the ambient light?.
It's possible that advances in computer vision will trickle back to photography — as I said, there's a lot of active research. In the meantime, you can't buy a camera that's different from any other, as far as multiple light sources are concerned. If you are in that situation, if you can't change the light, your best bet is to shoot in RAW, make multiple versions each adjusted to neutral for the various sources, and then blend those together manually (for example, using multiple layers and partially erasing to get an overall consistent look). This can be a lot of work — which brings us back to considering if we can gel or filter the light after all.
The human vision system is amazing, but it does have limits. The Kruithof curve describes the range within which most people report "pleasing" color constancy. Note that this is linked to brightness, with more tolerance for warm (low-K) dim light sources and more tolerance for cool (high-K) bright sources.
![public domain image](https://i.sstatic.net/xBWnD.png)
This is useful to keep in mind when composing photographs, as preserving (or creating) a blue or orange/red tint rather than white-balancing to neutral sends a message that the environment being photographed is outside the normal range for the apparent brightness (perhaps lit by candles or a campfire).