I think a lot of it is personality.
All four of my grandparents smoked. Everyone did then, in fact my grandfathers got cigarettes as part of their wages in the forces during WW2.
They all gave up some time around the 1960s. Never smoked again, they obviously had the personalities to give it up.
My parents said they would never smoke, but after getting married they bought an ashtray just in case they had smokers round. My dad was offered a cigarette in the staffroom one day in the 70s (a teacher) and has smoked ever since. He finds it too hard to give up. Which is a real bu**er because we all want him to give up. No-one wants to see someone they love lighting those things up 10-20 times a day. He also drinks every day, often to excess. Now, I think he is someone with an addictive personality. In many ways he is strong, but when it comes to addiction he is weak.
Now, in terms of learning by example, his parents had long given up before he started smoking. Neither me or my siblings smoke (although my siblings both smoked for extended periods when they were younger). So in my family at least, it isn't the case.
However, most people take up smoking by example. No-one wakes up one day and says "I think I'll take up smoking today!". It is because someone they know smokes, they think they'll try it.