We cannot know why Allah does what he does except from what he tells us. If this question bothers you, try not to think about it too much as it will bring you closer to kufr.
(5:101) O you who have believed, do not ask about things which, if they are shown to you, will distress you. But if...