Greece is hot and sunny in summer.
In spring, autumn and winter a strong chill wind can blow.
As a result, homes were built around closed, shady courtyards.
The courtyard gave privacy, it gave shade from the Sun (Greeks believed that a pale complexion was a sign of beauty and so they never became suntanned). It also gave protection from winter rain and wind.