In summary,
Your question roots to how life started and the purpose of life itself. The angels are obedient to God, they don't have free will. Jinns live amongst us and they, like humans, have free will and they also live and die like humans except their life expectancy is alot longer than ours. Although we humans can not see them, they can see us. Some jinns are good but most of them are bad. Iblis (satan) was one of the worthy jinns that was brought up to the heavens with the angels, and when Allah said to bow down and prostate to Adam (pbuh), all except Iblis failed to do so because he said he was better than Adam (pbuh), in that he was made of fire and Adam was made of clay. Iblis asked Allah (swt) if He could grant him life until the end of time, and he would make all humans go astray and not believe in the true Creator (Allah). So you see, the purpose life all goes to how life started with this story.
walaakum salaam