Theres a couple of reasons for it:
1) The tobacco industry had pretty big stakes in the early days of cinema and TV. Because of the industry’s early involvement heres a whole lot of dramatic shorthand that grew from then that revolves around cigarettes – you can quickly show that someone is relaxed, anxious, rebellious, cool, desperate, relieved, etc by the way they smoke a cigarette. {edit} you could also convey a lot of those emotions by showing them having a shit too I suppose. I think I’d draw the line at a post coital number 2 though {/edit}
2) To light a scene for the camera you need thick air
When the smoking ban came in – banning cigarettes and even fake cigarettes from workplaces including film studios – it gave directors and DOP’s real problem. Without people in the scene smoking…. where is all the smoke coming from?