Depression can be clinical depression (severe, enduring mood disorder and a mental illness), reactive depression or both.
As a psychologist, psychotherapist and coach I talk about my 20 year clinical research and practice. My experience tells me that without boundaries (knowing what is ok and what is not ok and acting to communicate this and behave in accordance), we get depressed.
If a family member or significant influencer ‘taught’ us (with their behaviour) that we should say or do nothing in the face of injustice, it’s likely they were in some form depressed themselves. In these instances, we can argue that depression is a ‘learned’ behaviour.