It’s the duty of the CEO to run the company in a manner that provides good return on the investments made by the shareholders.
If the CEO fails to do this, then the action to make any sort of a correction is in the hands of the shareholders.
I don’t see an apple apples comparison between CVS and Coke here anyways. Tobacco use is declining. The need for health services is increasing and will continue to do so. The former is low margin and the latter high margin, with the prospects of breakeven the first year and then increased revenue during the following years.
On that basis alone it looks like a logical and reasonable business move.
Pissing off 19% of your customer base is never a good thing, no matter how you cut it.