Once I heard a pilot announce out of the blue, non-scripted and during the time they were not supposed to, that smoking is prohibited and I spent the next third of the flight thinking that either someone smoked in the restroom or we have a fire in the baggage compartment.
As a passenger, I am yet to encounter a plane where smoking is allowed (and I have flown Air Serbia, so take that for what you will).
The same reason makes it dangerous to filter out smoke. You smell the smoke ASAP, you have a chance of emergency landing; you have a super advanced system that takes smoke out and feeds oxygen in… well, good luck with an actual cargo fire.
Also, you seem to assume passengers actually stopped smoking since the ban. Presumably, people smoke less, but at least now it’s more clear to the pilot that something is definitely out of order when there’s smoke.