I think that pre-disposition plays some part in anxiety and depression. Both conditions can also be brought on or worsened by life events. The main thing is that both can be managed through a range of different things- lifestyle, self care, meditation, medication, talking therapies, etc. Different things work for different people.