The most direct answer to why God allows sickness is because sickness is part of the effect of sin in the world and upon the descendants of Adam and it is God's will to let it happen. When Adam died, we died with him because he represented us (Romans 5:18). So when he fell, we fell in him (1 Corinthians 15:22). This is called Federal Headship.
Death is a form of sickness and God warned Adam and said "from the tree of the knowledge of good and evil you shall not eat, for in the day that you eat from it you shall surely die," (Genesis 2:17). Death, as well as sickness, are part of the effect of Adam's sin. When Adam sinned, he died. But, his death was not an immediate physical death it was a spiritual death, a separation from God (Isaiah 59:2). Furthermore, his sin was not restricted to him only. It affected Adam's descendants as well as the physical world because Adam also represented creation; he was given dominion over it by God. So, when Adam rebelled against God, sin entered the world through him (Romans 5:12). This is why creation groans under its present curse.
"For the creation was subjected to futility, not of its own will, but because of Him who subjected it, in hope 21 that the creation itself also will be set free from its slavery to corruption into the freedom of the glory of the children of God. 22 For we know that the whole creation groans and suffers the pains of childbirth together until now," (Rom. 8:20-22).
So, in our present state where sin exists within us, we also see its effects in the world around us. One of its effects is sickness.
In addition, in theology we have what's called the decretive will of God and the permissive will. God decrees certain things to happen like the creation of the universe, the flood, etc. In this he is directly involved and causes them to occur. But, with the permissive will of God we say that he permits things to happen (Ephesians 1:11). So, he permits people to lie, steal, etc. In other words, he is allowing bad things into the world because it is his will to allow them to happen. But he not only allows people to rebel against him he also allows other effects of sin in the world such as sickness.