First, we need to distinguish between those punishments brought about by nature and those brought about by society and law. Many actions in nature have an implicit consequence, such as harm, that may come back on the performer. Regardless of whether a particular person or group agrees that the consequence is "right" or "just", jumping off a high cliff and landing on rocks will probably kill you. The stock market example is like this -- the consequence of a bad prediction can be disastrous on one's finances, and the result is basically independent of what society thinks about the situation. Many actions in society, on the other hand, have explicit consequences set by humans. Because these consequences are not determined by natural phenomena so much as thoughts of man, questions of intent, prior occurrence, and extraneous circumstance may be brought into the picture.
Free market is a system that while created by humans behaves like a natural system. Consequences in a free market generally do not consider intent, prior occurrence, of extraneous circumstance. Larger entities, as an exception, may have special treatment by governments since these entities may have strong effects on society as a whole.
Now to the question of why people (and other thinking animals) tend to consider intent when evaluating an action or inaction of another being. On the surface, one may argue that deliberate and unintentional results should be treated equally since they have the same potential for harm. If we look at the goal of preventing further harm in the future (to society as a whole), however, we see a very important difference between deliberate and unintentional results:
When the harmful result of a person's actions was unintentional, the result alone should prompt the person to control himself or herself. After all, we tend to disagree with results that do not meet our intentions. These results make us feel stupid, and they make us look stupid, the combination of which is in many cases sufficient deterrence from relapse. Those having empathy are even less likely to make the same mistake again when they see the unintended harm they have caused.
When the harmful result of a person's actions was deliberate, on the other hand, the balance of natural forces of deterrence is considerably different. Since the result was intended, the person will not feel stupid. In fact, he or she will probably feel proud of having succeeded. In some cases, we will still have empathy playing a role. In practice, however, those individuals lacking empathy are far more likely to commit crimes and other wrongdoing while simultaneously lacking any remorse. In the extreme case we call these people psychopaths. While the psychopath proper may be relatively uncommon, lesser forms such as many narcissists may still exist in sufficient number that we cannot expect empathy alone from acting as deterrence from relapse.
Hence, we must consider intent when an action leads to harm. Other important factors to consider are prior occurrence, extraneous circumstance, and the psychological profile of the individual. When a person has a history that suggests a lack of empathy, we can expect that person to be more likely to relapse and hence more dangerous to society.
A side case is that of the idiot. These individuals often lack prudence when acting or making decisions. While an idiot may not intend to do harm, he or she may be naturally unsafe as a result of being unable to make proper judgements. Punishment may be unsuitable for complete idiots since they may not be able to change their ways due to lack of awareness and understanding. In these cases, one option is to keep these individuals away from means to causing harm. For example, it is best if idiots do not operate motor vehicles or firearms.