To put it very simply, it was used against nationalism and Westernisation, which was the only way the Ottoman Empire and the Turkish nation could be strengthened. That is how Kemalists and Ataturk himself saw the near past of their country, at least.
There were various problems that Kemalists found in the late Ottoman Empire. One was the lack of nationalism and a sense of Turkishness. Another was the lack of decisive and radical Westernisation. You see their judgment most clearly when they speak of the Tanzimat period that began in 1839 and of the Second Constitutional period (1908-1918). As Kemalists, rather rightly, observed, the reigning ideology for much of these periods was Ottomanism. According to this, all Ottoman citizens were equal regardless of their ethnicity, language and/or religion. Though this gradually (but almost exponentially after the Balkan Wars in 1912-13) lost its popularity, what gained the upper hand was not nationalism but pan-Islamism. Now, the Empire was seen as the Empire of Muslims. Certainly, there were Turkish nationalists, but they were never the majority or the dominant intellectual circle; especially before the WW1. The way this pertains to your question is the following explanation. For Kemalists, as many others at the time, they were living times of nationalism. All 'civilised peoples' of the world organised themselves as nation-states. Because of the Ottomanist and then Islamist mentality, the Turkish identity did not grow as mature and as rapidly as those found elsewhere, specifically in Europe. The result was a state apparatus alienated from a predominantly Turkish population, which, through the state's neglect, remained 'ignorant' and 'backwards', culturally and economically. This all the while, in a prominent Kemalist's words (Atay, Çankaya, p. 446), Arabs remained Arabs, Albanians remained Albanians, whereas Turks remained Muslims. This was in part because of Ottomanism, and in part because of the understanding of Islam at the time, he believed. In the case of ordinary Turks in the villages, this was especially the fault of that understanding of Islam rather than Ottomanism, which would have had a hard time reaching those villages at any rate. This is why you see peasants in the novels of early Kemalists like Yakup Kadri Karaosmanoglu (the author of Yaban, a thorough criticism of both the Turkish peasantry and the Turkish intelligentsia, who was guilty of the backwardness and ignorance of the former according to the author) define themselves as 'Muslims, not Turks'.
Second, as before, Kemalists were furious with especially conservative Islamists, madrasah circles and Sufis whom they saw as an obstacle in the way of Westernisation. Indeed, the major fault of Tanzimat and the Second Constitutional period was an overly conciliatory attitude towards Islamism. Any time someone with the intention of renewing the Empire stepped up, Kemalists like Ataturk thought, Islamists mobilised against him and made sure the intended reform ultimately came to nothing. Furthermore, these were responsible for keeping people 'ignorant', even more so than the state officials mentioned above. Kemalists did not necessarily think Islam itself was an obstacle in the way of progress. However, they certainly were against the then-reigning conservative readings of Islam. This was because this version of Islam stood in stark contrast with Westernisation. For people like Ataturk, a nation would either become Westernised and join the West (which was understood to be a civilisational rather than a racial or national category) as an equal member or would become a colony of the more advanced Western nations. Indeed, they thought, the latter is exactly what happened to the Ottoman Empire, because of the way the overly conservative Islamists circles halted every Westernisation attempt.
Perhaps it is obvious but it always helps to be explicit just in case: the events are narrated from the Kemalist point of view here since I am seeking to explain what they thought, which is your question. Whether things were really as they saw or not is another question.
I hope this brief answer helps! I could not go into much detail as I am in the middle of a tedious PhD dissertation process at the moment... But if you have any further questions, I would be more than happy to write more!
The reference is to Falih Rifki Atay, Çankaya (İstanbul: 1980).