They didn’t. Only Pol Pot’s regime was guilty of this. And based on his actual deeds it is clear Pol Pot wasn’t actually a Marxist Leninist, aka “communist,” either.
Lenin and Stalin radically increased literacy and provided free universal education. Stalin himself encouraged the building of engineering schools so the Soviet Union could industrialize, modernize, and arm itself against a potential German or Japanese invasion. You don’t lead the Space Race by exterminating all of your educated people.
Mao Zedong and his revolution also increased literacy and provided universal education. Mao also wanted to modernize as quickly as possible to defend the nation against imperial attacks. The purpose of the Cultural Revolution was to increase the public engagement of the masses, educate the youth about socialism, and enable the oppressed peasants to vent their frustrations with the former landlords who had oppressed them. They didn’t “kill all the educated people.”
Castro, Ho Chi Minh, and other communist revolutionary leaders were friends of education, not enemies.
Perhaps you are thinking about the U.S., which sponsored Operation Condor, a CIA operation which enabled right wing dictators to round up, torture, and exterminate working class intellectuals, communists, Catholic priests, and other opponents to the U.S. enabling neoliberal capitalism throughout Latin America to maintain its economic domination of “it’s backyard,” as the Monroe Doctrine so goes. Or maybe the political imprisonment of Julian Assange, a journalist who has exposed the horrors of the U.S. empire.
This is how the U.S. treats its dissident journalists:
The U.S. of KKKA is the Evil Empire. No question.