Why wasn't Iran colonized by any country, especially by British empire?
Persia / Iran was sovereign for most of its history.
At times Russia and / or Britain held some Iranian territory occupied, but Iran was not "defeated" wholesale prior to the Anglo-Soviet invasion in 1941... by which time "colonization" was no longer on the British agenda, and Soviet forces withdrew in 1946.
Iran was defeated in his history before the age of colonization:
- By Muslims, in 633 A.D. It lasted more than two centuries and even led to the change of the countries religion. The Persian Empire's official religion was Zoroastrianism. [Source]
- By Mongols, in 1219 A.D.[Source]
According to the definition, "colonization is a process by which a central system of power dominates the surrounding land and its components."
So we come to the conclusion that Iran was colonized and that's why more than half of the Persian words are from Arabic origin. There are also many words of Turkish origin entered into Persian by Mongol invasion(whose language belongs to the Turkish family of languages). So I do not agree with you, Iran was for many years colonized.
Let me address the issue of colonization in 19th century, "especially by British" and Russian empires.
A short answer is because the Great Game was essentially a draw, with the two sides (British and Russian empires) settling on having spheres of influence (in Iran). The story (British-Russian competition over Iran and the eventual settlement) is discussed at the end of Chapter 1 in
Elena Andreeva, ``Russia and Iran in the Great Game: Travelogues and Orientalism.'' Routledge, Abington, England. 2007.
To quote her book:
Formally, Iran was never a colony, mainly because of the rivalry between Russia and Britain – the balance of power between Russia and Britain was of particular importance in preserving the integrity of Iran. However, with the passage of time, Iran’s sovereignty was growing more and more limited....
Britain was mainly concerned with preserving the formal independence and integrity of Persia in order to defend the Indian empire. Russia, as mentioned above, deprived Iran of her Transcaucasian territories in the first half of the nineteenth century and of territory in the northeast in the second half of the century, and she had further expansionist designs on northern and northeastern Iran. Both Britain and Russia were striving to exercise as much influence as possible on the Qajar rulers in order to gain support for their actions in Iran and to repel their rivals. In the second half of the nineteenth century, the political, diplomatic and military activities of Russia and Britain in Iran came to be combined with their competition for concessions and loans
The tug-of-war between Russia and Britain for concessions led to the increasing economic encroachment of the two empires on Iran, hampering a balanced development of its economy. One striking example was the blocking of railroad construction in Iran at the end of the nineteenth century due to the attempts by Russia and Britain to prevent each other from receiving the railroad concession. The Shah’s pledge not to allow foreign companies to build railroads without consulting Russia lasted until the early twentieth century...
The most extraordinary and humiliating event in Iran’s relations with Russia and Britain took place on 31 August 1907. That was the date of the signing of the Anglo-Russian Convention, which divided Iran into spheres of influence and reconciled the differences between the governments of Russia and Britain. Though the preamble to the agreement mentioned the integrity and independence of Persia, the Iranian Government was not even informed about the Convention. According to the terms of the Convention, the northern and central areas of Iran were reserved for Russia, with Britain promising “not to seek for herself, and not to support in favor of British subjects, or in favor of the subjects of third Powers, any concession of a political or commercial nature.” Britain also promised “not to oppose directly or indirectly, demands for similar Concessions in this region which are supported by the Russian Government.” Southeastern Iran came under the British sphere of influence, where Russia undertook similar obligations. The area between the Russian and British spheres was made neutral territory...
I refer to the book for further details.