This is something that has perplexed many observers over the past century. From Martin Heidegger's positive estimation of national socialism to Jean-Paul Sartre's early flirtation with communism, many of the most influential philosophers and writers have flirted with an ideology that promises redemption and uses any means to achieve it, however costly in human terms. Sartre himself became disillusioned by Moscow's crushing of Hungary in 1956 but continued to advocate some form of socialist revolution in his later years.
There is more than one element at work here, but for now I will mention just one, which is the tendency to identify one's theories of reality with reality itself. The Dutch philosopher Herman Dooyeweerd (1894-1977) wrote extensively of the Gegenstand-relation in articulating his understanding of the nature of theoretical thought. When we theorize, we take one of the aspects of reality out of the coherence of the various aspects and examine it as an object (Gegenstand) in order to understand it better. Here the analytical modality is set against, say, the jural, the economic, the aesthetic, or the ethical modality. Nevertheless, despite the fact that our minds and the nature of reality itself allow us to engage in this form of abstract reasoning, created reality remains a unified whole. Our experience of this reality in the pre-theoretical stage is of mountains, forests, oceans, animals, schools, families, hospitals, and so forth.
Theories are not just descriptive but often prescriptive as well. If you believe that your theory gives you a key to understanding the world, and if others disagree with the prescriptions that flow out of your understanding, you may come to think yourself entitled to impose your ideas on others, much as Plato saw his philosopher-kings doing in the famous cave parable in book VII of The Republic. If, after engaging in theory, you believe that, say, the economic modality is key to reality, then you have done little more than to confuse the Gegenstand-relation that allowed you to analyze the economic modality with a larger reality of which the economic is but one aspect. As intellectuals are usually, well, quite intelligent, they are tempted to assume that others less intelligent than they ought to defer to their ostensibly superior knowledge. Yet they have failed to distinguish adequately between naive experience and the theoretical mode of thought, which is not an inconsequential failure. This leaves them vulnerable to a certain hubris and a conviction that theory must take precedence over the pre-theoretical experience of ordinary people living out their daily lives.
People firmly persuaded that their prescriptions are correct may stop at nothing to see their ideas implemented. That of course is where totalitarianism enters the picture.
This tendency is what motivated Raymond Aron to write of Marxism as The Opium of the Intellectuals and Arendt to defend the public realm of speech and action both against the economic realms of labour and work and against the pretensions of philosophical thought, each of which she saw to constitute a threat to the free deliberation required for a healthy political life.