You are oversimplifying things a bit. Iblis was considered to be a jinn prior to his ascension as Al Harith (Azazil). Even after his ascension, there is a varying belief that he was still jinn just was granted more authority over the holy land due to being in Allah’s favor.
In early Islam, jinn were not considered to be demons. Jinn were initially considered to be neutral spirits that leaned more towards nature. Some jinn were good, some jinn were bad, and then you had those that were neither.
As time went on though, Islam incorporated more Jewish ideals into their religion which in turn painted jinn in a more different light, now jinn were considered to be synonymous to demons.
Yes I know that Iblis did fall, but in early Islam shaitan was not just a title or label for one being, it was used for any jinn that was rebellious or malevolent in nature.
Also, Azazil isn’t the proper term for the goat spirits you are talking about. The beings you are talking about are known as se’irim. Azazil was said to be the chief of them and they really weren’t considered to be demons until Jewish influence. If I remember correctly, the se’irim stem from the shedim and the shedim stem from the lamassu who were considered to be Mesopotamian protection spirits that were associated with the flying class of jinn/genii.