Sam- I believe The Diamond Sutra and other Buddhist text were hidden in the caves because Buddha's teachings criticized Confucianism. Buddhism was banned from influencing people in China when a resurgence of Confucian and Taoist ideas occurred. There was also an attack made by northern nomadic tribes against Dunhang and other places on the silk road, which also could have influenced someone to hide the sacred manuscripts from being destroyed.

CajunTexasMan- None of my research indicates how long it took him to produced but did state that he was a very experienced and skilled man in block printing. I also know that it was a pretty tedious and meticulous process. The sutra was made in seven sections, each one printed on a single block, but first the characters were painted on thin pieces of paper and pasted face down onto a wooden block. He then had to carve the reverse shapes.