Aramaic, Greek, Arabic were Lingua Franca in the Middle East and Arabic even became the daily language for many. Why didn’t Turkish ever replace Arabic?
In answering this, I am assuming that you’re referring to the period which concerns the Middle East under Ottoman rule.
As a Caliphate, the Ottoman Empire sought much of its legitimacy through identification as an Islamic Empire. It’s position as protector of the Hijaz (the holy cities of Mecca and Medina) was central to maintaining its authority over much of the area we now associate with the Middle East, as the vast majority of the population was/is Islamic.
Ultimately, islam and Arabic cannot he separated. The Quran and the Hadiths are written in Arabic, as this is the language in which the word of god was transmitted to Mohammad (someone may be able to expand on this in more detail). Therefore the essence and meaning of Islam can only truly be conveyed through Arabic - this is why you have many Muslims who can read Arabic, and recite parts of the Quran without knowing what it means. By the time of the ascendancy of the Ottoman Empire, islam has already taken firm hold over most of the Middle East, and consequently Arabic had become the dominant language. Turkish, despite being the language of court, never had a social foundation from which it could penetrate the region. Essentially, it was a foreign language spoken by a small elite, most of whom also spoke their own local/regional language. It had no pre-existing connection with the Levant or Arabia.
Compare this with Persian, for example, which has existed concurrently alongside Arabic. This has been enabled because Persian does have a connection with the wider social fabric. Persian literature, and poetry, is a pillar of the Iranian identity, and this allowed it to survive as a means of transmitting local myths and epics.
The provinces of arabic speaking populations have always spoken a semitic tongue and arabic was always behind in the background besides aramaic. Greek was a lingua franca but never a spoken language of most of the population, only the elites would have had a true mastery over it and it was limited to urban centers. There is simply no reason to do a switch to Turkish from a linguistic point of view and historical one. Turkish was an administrative language though.