Is use to be common for paint to slowly turn yellow over time. This hardy occurs with more modern paint, as the technology has improved. But older houses sometime have sections of yellow paint, which gives a room an uneven appearance.
Older paints will slowly turn yellow if they are left in the shadows. This is easy to see with spaces behind wall paintings, behind cupboards, beneath shelves, inside pantries and built in spaces. If these areas remain hidden the yellowing issue is not noticeable. But if the room décor is rearranged the yellow areas of the walls may be unsightly.
The yellowing is the oxidation of alkyd or oil based paint. Varnish will suffer a similar problem. While this is mostly caused by lack of light, mainly sunlight, paint can also turn yellow in heat. So old painted areas behind radiators of stoves will also tend to turn yellow over time.
Modern paints are far better lasting than older paint formulations. Not only will there be no yellowing in the shadows, there will be far less fading in the sunlight.
A good paintjob on your house is a sound investment in your home.