I picked those examples specifically because they are enforced.
> Regarding drugs and guns — how is that enforced? Can’t see how a gun dealer would know.
All gun dealers must record form ATF form 4473 for each gun purchase, which specifically asks questions about drug use. If you say yes, you will be denied the gun. If you lie, you may face up to 5 years in prison plus $10K fines. If your state has a medical marijuana registry, this may be cross referenced. If you are later found to be in possession of a gun and marijuana (or evidence of use like a marijuana card), you are a "prohibited person" in illegal possession of a firearm. These still happen, they just get reported as "weapons charges" because that's what they are.
> Also, employers can drug test for nicotine, which is legal, and deny employmet.
Federal jobs (or federally regulated jobs, i.e. being a pilot[0]) don't ban it.
0: https://www.kgns.tv/content/news/Colorado-pilot-fired-after-...