We all know that Allah says human creation is perfect but why there is chromosomal or birth defects happen for example congenital heart disease, Down syndrome etc. Is it just a simple anomalies or Allah create them in purpose?
Mr. Zeeshan answered part of it. The perfection Allah mentions is that of our nefs and spiritual side; see Quran suras 91 and 95.
We are granted perfect nefs as individuals, that is in perfect submission to Allah, when we are first born.
(91:7) Wa Nafsin Wa Mā Sawwāhā (And the human nefs that (Allah) formed to perfection)
(91:8) Fa'alhamahā Fujūrahā Wa Taqwāhā (And who has inspired it with the conscience of what is wrong and bad for it and what is right and good for it)
(91:9) Qad 'Aflaĥa Man Zakkāhā (He is indeed prosperous who purifies it)
(91:10) Wa Qad Khāba Man Dassāhā (and he is indeed lost who corrupts it)
Also collectively mankind was in perfect submission to Allah when he was first created, then unfortunately fell from grace. Those who have iman and do righteous deeds can get back their grace.
(95:4) Laqad Khalaqnā Al-'Insāna Fī 'Aĥsani Taqwīmin (Surely We have created man in the best of forms)
(95:5) Thumma Radadnāhu 'Asfala Sāfilīna (Then we have reduced him to the lowest of the low)
(95:6) 'Illā Al-Ladhīna 'Āmanū Wa `Amilū Aş-Şāliĥāti Falahum 'Ajrun Ghayru Mamnūnin (Except those who believe and do good righteous deeds, for them there is reward constant and beyond measure)
To answer "Allah create them in purpose?", we must consider what our role is in this worldly life in the dunya. Allah (swtala) created mankind to worship Allah. Everything we do, every decision we make, the attitudes we take, either brings us closer to Allah in worship or farther from Allah.
Our attitude in response for what Allah's specific providence to us whether genetically from birth, or environmentally after birth are trials for us in this regard. We either increase our iman (faith) through Shukur (gratitude and thankfulness to Allah) and Sabr (patience), or harbor resentment in our hearts through Kufur (doubts and rejection of Allah).
Let us take the example of someone born mentally handicapped. In the Quran it says (please excuse the transliteration as I can't type arabic)
(2:286) "Le yukulif ulahu nefsen illah wusaha (Allah burdens no soul except within its capacity)" and right after "leha ma kesebet wa aleyha mektesebet (Each its favor is whatever (good) it earns, and against it whatever (evil) it commits)"
Since in many cases such a handicap will encumber the person from making many decisions including right from wrong, this handicapped person will have a light burden in terms of faith and moral choices in this life and thus pretty much guaranteed jenna (paradise) in the ahira (hereafter).
The situation for the parents is much more difficult. It is easy to have sabr and shukur for a normally born child. The real test is for the parents whos child has a birth defect, genetic illness, anomaly, handicap, etc. One might think that such burdens are not fair and in many cases too burdensome for any parent to handle. If the parent does not have iman in Allah, the Yawm i Diyn (day of judgement), and ahira (hereafter); then consensus would have it that it does indeed seem like an unfair and excessive burden.
However as a muslim, we welcome all blessings and trials from Allah. The apparent burden of all the extra effort and sabr needed to raise a handicapped child is a test of iman and sabr, and we know for certain that this extra burden in this life will be well rewarded by Allah in the ahira.
Quran (94:6) "inna maal usri yusra (Surely, for every hardship comes ease)"
Since our focus is on the next life, we welcome such trials, so we can overcome them through sabr, learn from them and increase our iman, and thus accordingly earn a higher station in Janna InshAllah.
Quran (87:16-17) "Bel toosirunel hayated dunya. Wal ahiratoo hayruw wa ebka. (But you focus on the worldly life, whereas the hereafter is better and more lasting)"
What ever Allah does, there is something better for him in that.
More than that, we people are more to be pointed at for this situation rather than Allah. We know Allah stops us from any sort of drugs. But still when couple uses drugs and they mate. The children they give birth to, are abnormal; mentally and physically. So is Allah to be blamed here?
You might even find a cover "No drugs while pregnancy" then if we still continue its our bad. We know these things are bad for our children, but we continue. Furthermore, the medicines we take are also a part of it. I have an 18 year old cousin of mine, but mentally is just 6. Doctors tell, it is a result of some sort of pain relieving injection her mother had to take while pregnancy.
No, its not Allah to be blamed, its us the humans who changed ourself in such condition. Most of such sicknesses are due to our own faults, such as one I mentioned above, other reasons include carelessness, like eating less diet for the pregnant female.
The process in every mammal is very same, biology determines that mitosis and meiosis are the two major processes that take place and play a role in the birth process. But the diseases are severe in humans but not in the animals (other mammals). Why?
Allah never does bad to his creation. Its us, who do bad to ourself.
The "blame the victim" approach above is so wrong! That is not Islamic. That is like blaming someone for cancer. Sometimes medications have to be taken during pregnancy. It is very easy for a man ignorant of medical knowledge to say women shouldn't take medications during pregnancy. AND what about the genetic disorders? Those aren't caused by medications. They literally cannot be caused by human actions. How is it my fault that my child has a gene mutation that both my husband and I carry? Neither my husband, nor I, knew we were carriers; we are not even related. It was pure bad luck. Allah just curses some people.