Shit happens. Everyone knows that, and that it's inevitable ? it's pretty much impossible to live a full life and not have shit happen to you at some point. And when shit happens, most people immediately try to look for a reason in it all. Not cause, but reason ? as the cause is often clear, but lacks the inherent meaning of a reason ? and often when no easy reason presents itself, people resort to ridiculous conclusions such as "It was God's will" when what they really should do is say "There was no reason".
First of all it's important to realize the difference between 'cause' and 'reason'. Cause is the agent that set something else into motion; cancer, for instance, is (some times) caused by gamma radiation on living tissue. Cause, however, lacks inherent meaning ? there is no conscious choice or design implied by simple causality. This is where reason comes into the picture; if a bully beats you up at school, the cause of injury is his fist coming into contact with your face at high velocity, whereas the bully's reason for doing so is to get at your lunch money or quell some personal feeling of inadequacy. Cause answers the question What?, whereas reason answers the question Why?.
So then, whenever shit happens, people instinctively look for reason. It appears we are pre-programmed to seek the answer to the question of "Why?". Most of the time this is good and fair and the answers are simple ? the reason for a person getting fired, for instance, might be budget cuts or inadequate performance from the person in question ? but yet often we find our quest for reason difficult. What's the reason behind someone dying of cancer or getting hit by a car? It's easy to see what caused these things, but it doesn't answer why.
People who think about this tend to commit an illicit fallacy ? they come to the conclusion that 'I cannot find the reason behind this event, hence the reason must be beyond my understanding'. This may sound rational at first, but isn't. This fallacy is caused by the assumption that reason exists for all events, when in reality they only exist for some events. This fallacy tends to be coupled with a particular, very common anthropomorphication of nature, which after some more frotzing leads people to conclusions like "I'm being punished", "It's a trial", or the ultimate catch-all: "God works in mysterious ways".
One can only speculate about why people seek these reasons to begin with. My personal theory is that people need somewhere to place the blame when something goes wrong ? someone to be angry at, some person or phenomenon towards which to direct our anger and sadness caused by the event. Quite often among religious people, the blame ends up being placed on God; and since the Lord certainly can't be blamed for anything at all, being infinitely wise and just, the whole need for placing guilt gets rationalized away and people somehow can get on with their lives.
This need for placing blame is itself rooted in something else, more universal; humanity's fear of meaninglessness. Ever since the early days of man, people have sought reason in events, trying to find some reason for justifying every single occurance in the universe ? all because they fear the inherent meaninglessness of things. For indeed, if things can happen without reason, without meaning, then it might mean that one's own existence is unjustified ? existential crisis. Why we feel this need to justify everything with reason is unknown; indeed, we've now managed to return to the question being argued two paragraphs ago, albeit at a "deeper" level.
The conclusion one should come to is simple: there is no reason. Things happen without reason, and all existence is inherently meaningless. There is no cosmic reason that meticulously plans and justifies every single event in the universe, or indeed even a single event. Cause is plenty, but reason is scarce; it is only among intelligent beings such as humans that a concept like reason can exist. There is no destiny to fulfill, no divine task to be carried out. Life is, ultimately, completely pointless from a cosmic viewpoint (although humans can come up with reason in themselves; that, however, is a different issue).