I flew a corporate jet years ago where a previous captain chain smoked in the aircraft. Aside from scaring away passengers when he refused to stop smoking for their comfort (I do not even mention the crew here!) he caused countless problems with the avionics years later after he was terminated. Tar deposits nearly always led to mechanical problems with the instruments and switches.
It is a costly problem mechanically, personally and medically. Enough of one to make it clearly out of place on the flight deck.