At the beginning of human civilization, there was a long period of obscurantism, and there was no concept of direction. When humans began to try to determine their orientation, the most intuitive sign they could rely on was the sun in the sky. The sun rises over one side of the horizon every morning and sets over the other in the evening. If you connect a straight line between the rising position and the falling position, you can determine the two most basic directions, which are the origin of east and west.
Not only the Chinese, but other ancient peoples in the world also have a knowledge of orientation related to the sun. For example, today we divide the world into 7 continents. The word Asia originally meant "rising" and was used to refer to sunrise and the east; Europa meant "submergence" and was used to refer to sunset and the west. Later, the ancient Greeks used these two words to refer to the land on the east and west sides of the Aegean Sea respectively. Today, people still call the Anatolian Peninsula in Turkey on the east coast of the Aegean Sea "Asia Minor." Later, Asia and Europe gradually evolved into the names of two continents.
The ancients understood the two directions of south and north later than east and west. To determine north and south, it is still necessary to observe the movement of the sun. China is located in the northern hemisphere, and the direction of the sun at noon every day is south, and the direction of the back sun is north. When the weather is fine, a pole is erected on the ground, and the length of the pole is measured every once in a while, and the shortest shadow length is at noon. At this point, one end of the shadow points due north, and the other points due south. At different times of the year, the position of the midday sun in the sky will move in a north-south direction.