Why are airliner underbellies generally painted differently?
Originally (way back before radar) the colors had a practical use for maintaining visual separation between planes, which was done by pilots looking for the other planes with their eyes:

Dark underbelly: Easier to see from below against bright clouds or sky.

Light top-body: Easier to see from above against (typically) dark ground.

The idea being that when you're looking visually for other civilian air traffic (or from the ground) one wants to maximize visibility without losing them in sky glare or ground clutter.

If you look at older military planes you'll often see the exact opposite (dark colors on top and blue on the bottom) because those military planes didn't want to be seen.