It is uncertain when or why the human sense of geographic orientation and direction became associated with winds.[1] It is probable that for ancient settled populations, local physical landmarks (e.g. mountains, deserts, settlements) were the initial and most immediate markers of general direction (“towards the coast”, “towards the hills”, “towards the lands of Xanadu”, etc.). Astral phenomena, in particular the position of the sun at dawn and dusk, were also used to denote direction.[2]

The association of geographic direction with wind was another source.[3] It was probably farming populations, attentive to rain and temperature for their crops, that noticed the qualitative differences in winds – some were humid, others dry, some hot, others cold – and that these qualities depended on where the wind was blowing from. Local directional names were used to refer to the winds, eventually giving the wind itself a proper name, irrespective of the observer’s position. This was likely furthered by sailors who, far from landmarks at sea, nonetheless recognized a particular wind by its qualities and referred to it by a familiar name.[4] The final step, completing the circle, was to use the proper names of the winds to denote general cardinal directions of the compass rose. This would take a little longer to work itself through.

Source: Classical compass winds – Wikipedia