Why do people commit suicide? I don't understand why people commit suicide. 

If I imagine myself in a really bad situation and make a list of what kind of things I would do in that situation, I don't have suicide even in my top-100 things to do in my list! In the worst situation I would abandon everything and go on a trip!

So why do people not just throw away everything instead of committing suicide?
People who kill themselves usually believe that they are in an unbearable situation from which they cannot escape and that things won't ever get better.
The problem with research into the reasons for suicide is that those that successfuly killed themselves can no longer explain their motives, and those that survived might – consciously or unconsciously – have planned not to die, so their motivations might not be motivations to die but motivations to affect others or to relieve tension (similar to non-suicidal self-injury).
A close friend who only accidentally survived a suicide attempt (because, not being a physician or apothecary, she had unknowingly chosen sleeping pills that cannot kill you, no matter how many you take) had been abused as a child, consequently lost all self-worth, felt she would never experience love and happiness, and finally tried to end her misery when she was 21. Her survival was followed by another, successful, suicide, which to me shows that her first attempt was earnest.
This is the only person I know who wanted to die and told me her reasons, between the two attempts. More abstractly, her reason was the one stated at the beginning of my answer: not simple depression or hopelessness. We all go through such phases, but we know they pass, so we bear them and wait for better times. This person had been depressed and miserable for so long, that she could no longer imagine things changeing for the better. Unable to bear the idea of having to endure another eighty years of unhappiness, she ended it.
There is some research into reasons for suicide, which, as far as I know, does not emphasise this point and thus fails to explain why some people kill themselves in a moment of hopelessness, while others don't. For example, Brown, Comtois and Linehan (2002) interviewed women who attempted suicide and compared their motivations to women who performed non-suicidal self-injury. Their abstract summarizes (my emphasis):

Overall, reasons given for suicide attempts differed from reasons for nonsuicidal self-injury. Nonsuicidal acts were more often reported as intended to express anger, punish oneself, generate normal feelings, and distract oneself, whereas suicide attempts were more often reported as intended to make others better off. Almost all participants reported that both types of parasuicide were intended to relieve negative emotions. It is likely that suicidal and nonsuicidal parasuicide have multiple intents and functions.

Some old people who ask physicians for assisted suicide report that they don't want to burden their families. I think it is a true reason for some people, while others would probably rather want to live, if they could stop being debilitated by old age. Again, the underlying reason is that these people feel they cannot change their situation to the better. Borderline women might feel the same, since their emotional instability, inability to have functioning relationships, fear and depression, are not momentary but have usually been there for all their adult lives, often as effects of some trauma such as childhood abuse.
Adolescents, who are often thought to be more self-centered and less socially concerned in their motives than old people, also report more self-centered reasons to kill themselves. In their study of adolescent suicide, Boergers, Spirito and Donaldson (1998, my emphasis) found that

Consistent with prior research, the most frequently endorsed motives for self-harm were to die, to escape, and to obtain relief. More manipulative reasons for overdose (such as making people sorry) were endorsed less frequently. Adolescents who cited death as a reason for their suicide attempt reported more hopelessness, socially prescribed perfectionism, depression, and anger expression.

With the restriction that we don't know who of the suicide attempters really wanted to die, nevertheless for most of them the primary reason was to end a life they had no hope of changing to the better.
Because what does it mean that you feel you are not perfect enough? For adolescents it usually means that you feel you are so ugly no one will ever love you, or that you are introverted and cannot make friends and have been outside the ingroup for so long that you no longer believe that anyone will ever love you. It does not matter if other, less pretty people, can be happy, or if other loners can make loner friends, the important aspect is that you feel you are not good enough to be loved by those that you want to love you and that nothing you ever do (makeup, bringing home good marks) can change that, because in truth, for example, it is not actually you who are unlovable but your parents who are unable to love you because of their own mental disorders (and that is how some of them are passed on through the generations).
Studying successful suicides, Cavanagh, Carson, Sharpe and Lawrie (2003) found that

mental disorder was the most strongly associated variable of those that have been studied. ... Suicide prevention strategies may be most effective if focused on the treatment of mental disorders.

This is of course a very global result, but it shows that people don't usually kill themselves because they experience dire circumstances or a bad phase in their lives, but only if their long term mental well-being is destroyed.
Linehan, Goodstein, Nielsen and Chiles (1983) have studied the reasons why people do not kill themselves. The primary reasons for living, if suicide was contemplated, were:

Survival and Coping Beliefs, Responsibility to Family, Child-Related Concerns, Fear of Suicide, Fear of Social Disapproval, and Moral Objections.

Besides fear (of dying and death and the judgment of God and men) and responsibility for family and children, the main reason to keep people alive was their belief that they could survive and cope! If we turn this around, the main reason to die (besides having no responsibility and not being afraid, or overcoming those concerns) is the belief of not being able to cope.
What makes you kill yourself, in sum, is that you can no longer take it and believe you cannot change it. Very simple – and horribly tragic.

Sources:

Boergers, J., Spirito, A., &amp; Donaldson, D. (1998). Reasons for adolescent suicide attempts: Associations with psychological functioning. Journal of the American Academy of Child &amp; Adolescent Psychiatry, 37(12), 1287-1293.
Brown, M. Z., Comtois, K. A., &amp; Linehan, M. M. (2002). Reasons for suicide attempts and nonsuicidal self-injury in women with borderline personality disorder. Journal of abnormal psychology, 111(1), 198.
Cavanagh, J. T., Carson, A. J., Sharpe, M., &amp; Lawrie, S. M. (2003). Psychological autopsy studies of suicide: a systematic review. Psychological medicine, 33(03), 395-405.
Linehan, M. M., Goodstein, J. L., Nielsen, S. L., &amp; Chiles, J. A. (1983). Reasons for staying alive when you are thinking of killing yourself: the reasons for living inventory. Journal of consulting and clinical psychology, 51(2), 276.