In ancient times, the Yue region (modern-day Zhejiang) was known for its straightforward and honest folk, who valued loyalty and honor in friendship above all. When forming a new bond, they held a ritual: they would build an earthen altar, slaughter chickens and dogs, and place the cooked offerings on it. Then, the new friends would sincerely swear vows before the altar. One would declare, "Though you ride in a carriage (symbolizing wealth and status) and I wear a straw hat (symbolizing poverty), if we meet in the future, you must step down and greet me as a friend." The other would reply, "You ride a horse while I walk, but if we meet later, you must dismount." A local folk song echoed this sentiment: "You ride in a carriage, I wear a straw hat; when we meet, you step down and bow. You carry a bamboo hat, I ride a horse; when we meet, I dismount for you."
"Riding in a carriage" and "wearing a bamboo hat" refer to the wealthy who ride carriages and the poor who wear straw hats. The idiom "Riding in a Carriage, Wearing a Bamboo Hat" describes deep friendship that remains unchanged despite changes in wealth or status. Later, close friends were also called "carriage-and-hat friends."
Source: *Zhou Chu*, "Records of Local Customs"
Meaning of the Idiom: Later, the Chinese idiom "乘车戴笠" came to describe deep friendship that remains unchanged despite changes in wealth or status.