Both of these issues appear to be designed to mentally anchor the believer to their particular side and discourage investigation beyond the simple answer provided. Having a difficult time understanding why you friend died well, "God has a plan for everything." Not really understanding why your cancer came back after being in remission for ten years, "It is not your place to question Allah, the one who gave you a mind to think."
These statements are why it becomes difficult to ask questions of God in times of trouble. However, the Creator, if it holds the position of omnipotence and mercy attributed to it, it is most likely not going to be offended when we ask simple or complicated questions about the circumstance involved in our life. So why do both books contain such prohibitive sounding language?
First there is the interpretation issue. Perhaps we are misunderstanding the heart of these texts, they could have been placed there originally to present comfort to the believer. Over time these compassionate texts have been corrupted by interpretation and jammed outside of there receptive field into the realm of inquisition. Second, they truly were placed there as barriers to keep people inside. By doing so it increases membership exponentially as families have children that will never leave. And make no mistake though the media accuses the Muslim community of growing quickly because of the "born into the religion" shtick the Catholic and Protestant church have been employing the same tactic for years.
I would encourage us all to step away from this illogically constructed intellectual cage that is either constructed out of malice, misinterpretation or mission. Instead we should know that the being that created the entire universe has "big shoulders" and can handle our questioning and accusation. In fact it is probably welcomed because it would indicate to the divine its creation is using the mind it so careful crafted in the time before time.