All sort sorts of reasons for depression are thrown about on the internet. Some more helpful than others. But the big question many people ask is whether it has a biological roots and is caused by a chemical reaction in the brain or whether it is a psychological condition influenced by our thoughts and attitudes.
According to Psychology Today, the best answer is many things. To start with there can be genetic and neurochemical factors that play a role in the onset and course of depression. The misconception many people have, though, is that you have a neurochemical anomaly and then depression results.
In fact, it is a two-way street: Your experience influences your neurochemistry at least as much as your neurochemistry affects your experience. These include your problem-solving capabilities, your coping style (whether you deal with problems directly and proactively or either ruminate or go into avoidance), your decision-making style (many people who are either depressed or are prone to depression make bad decisions that lead to depression and even make their depression worse), your perceptions of control (whether you see yourself as a victim of life experience or as having the power to take charge of your life), the quality of your relationships and relationship skills, and many other such personal factors.
Feeling hopeless and helpless are part of the disorder, and so depressed people are prone to believe there is nothing they can do to help themselves. That is flatly untrue. When people educate themselves and take proactive and deliberate steps to get help, including self-help, the probability of overcoming depression is high.