According to Iraq's report to the UN, the know-how and material for developing chemical weapons were obtained from the United States, West Germany, the United Kingdom, France and the People's Republic of China.
In December 2002, Iraq's 1,200 page Weapons Declaration revealed a list of Eastern and Western corporations and countries, as well as individuals, that exported a total of 17,602 tons of chemical precursors to Iraq in the past two decades. By far, the largest suppliers of precursors for chemical weapons production were in Singapore (4,515 tons), the Netherlands (4,261 tons), Egypt (2,400 tons), India (2,343 tons), and Federal Republic of Germany (1,027 tons). One Indian company, Exomet Plastics (now part of EPC Industrie) sent 2,292 tons of precursor chemicals to Iraq. The Kim Al-Khaleej firm, located in Singapore and affiliated to United Arab Emirates, supplied more than 4,500 tons of VX, sarin, and mustard gas precursors and production equipment to Iraq.
According to Iraq's declarations, it had procured 340 pieces of equipment used for the production of chemical weapons. More than half came from a US firm via a German company, the remainder mostly from France, Spain, and Austria.
In addition, Iraq declared that it imported more than 200,000 munitions made for delivering chemicals, 75,000 came from Italy, 57,500 from Spain, 45,000 from China, and 28,500 from Egypt
It was business. Iraq wanted to buy , suppliers provided. It was the Iraqis that manufactured the chemical weapons and used it.
The treaty to ban chemical weapons was signed later, 1997, I think.
The ban does not include the chemical precursors which can be used for something else.