I think for me it’s a combination. I’ve been using alcohol since my early 20's. The inner turmoil sometimes is just so painful that alcohol is the only thing that will dull it. I can't say that was learned behaviour as there are no alcoholics in my immediate family other than myself. I did, however, have an alcoholic uncle so that's probably where I got my gene. My other bad coping mechanism is suicide ideation which again is just a me thing. I have, however, learned a myriad of other bad coping mechanisms from my family of origin - poor conflict resolution skills, passivity, people blaming, martyrdom, passive-aggressiveness, etc. The above may make me sound bad but I’ve also been told many times by different people that I’m very kind and have a good heart – so it’s not all bad.
The bad coping mechanisms I learned first were from my family and others who were going thru the same thing as me. I learned the good coping mechanisms from a really great therapist and lots of time. I still regress at times(suicidal ideation) but now have a horse to help me get out and away from people. By the way, I used to keep bees when I lived on a farm. Very calming.