Why did Mao inflict the horrors of the Cultural Revolution on China?

Fortunately, world civilization has evolved since then, and we have no world leaders like that today.