The Great Wall of China is held together by sticky rice mortar. Around the year 500 A.D., the Chinese started mixing sticky rice soup with slaked lime to make very strong and weather resistant mortar. – WTF Fun Facts
WTF Fun Fact – Sticky Rice Mortar

@Marie. It is not a coincidence at all. They tested it and figured out it worked well.
You need a lot of water for the mortar and you need a lot of rice for the workers. The rice cooking produces a lot of waste water.
This is likely a coincidence. A lucky one.