Mooncakes were initially used as offerings to worship the moon god.
Moon worship is a very ancient custom in China, which is actually a kind of worship activity of the ancient people to the "moon god". To this day, the Mid-Autumn Festival and eating mooncakes and enjoying the moon is a necessary custom of the Mid-Autumn Festival in all parts of China, north and south. Mooncakes symbolize reunion, and people treat them as festive food, offering them to the moon and giving them to friends and relatives.
Mooncakes have a long history as offerings to the moon god. Mooncakes have been blended with food customs in different places and developed into Cantonese, Jin, Beijing, Suzhou, Chao, and Dian mooncakes, which are loved by people in different parts of North and South China.
Expanded Information:
Moon worship is a very ancient custom in China, and mooncakes were the ancient offerings for worshiping the moon god at Mid-Autumn Festival, as well as the seasonal food for Mid-Autumn Festival. The mooncake is round and round, and it is shared by the whole family, symbolizing reunion and harmony. In ancient times, every Mid-Autumn Festival night was held to worship the moon. A large incense burner was set up with mooncakes, fruits and other offerings.
Under the moon, the statue of the moon god is placed in the direction of the moon, red candles are lit high, and the whole family pays homage to the moon in turn, and then the housewife cuts the mooncake for reunion. Mooncakes have a long history as an offering to the moon god. The word "mooncake" was first recorded in the Southern Song Dynasty in Wu Zimu's Mengliang Lu. To this day, enjoying the moon and eating mooncakes on the Mid-Autumn Festival is a necessary custom for Mid-Autumn festivals all over China.
Baidu Encyclopedia-Mooncakes