What is the pool in the center of Fujian residential buildings for?

This is an ancient and early way of building, mainly for lighting, because the pool (called "deep well" by the locals) is open above, and with the help of sunlight, the home is very bright and not used as a pool. The early walls were made of small rubble (irregular stone corners), with thick thickness, small windows and poor lighting.

But now there are no such new houses. Now they are all built in European style villas, and even stone houses are new.