Turkey chose to develop a large defense industry. There were restrictions on them acquiring some US weapons (even though they are NATO member) but that wasn't the motivating factor, it was a political choice to develop large defense sector.
Other countries like Iran however, do develop their own drones because of sanctions
The strict tensions imposed after Turkey's intervention in/invasion of northern Cyprus in 1974 played a key role in the development of the Turkish defense industry.
Other countries like Iran however, do develop their own drones because of sanctions