SAN FRANCISCO — David Dancer is a 48-year-old marketing executive who has worked for big brands like Charles Schwab and Teleflora. A year ago, he got a call from a recruiter for a different kind of company: MedMen, a cannabis retailer that has been called “the Apple Store of weed.” The opening was for a chief marketing officer. He took it.

One of Mr. Dancer’s early projects was a slick two-minute video by the director Spike Jonze that begins with an anecdote about George Washington as a hemp grower, a staple of dorm-room conversation. It concludes with a suburban couple coming home with a bright red bag of legally purchased pot, symbolizing “the new normal” — an ending that, like his own career twist, seemed improbable not long ago.

“It can and should be a part of anyone’s everyday life,” Mr. Dancer said in a recent interview, sounding very much like a man who has been hired to do marketing.

Although cannabis remains illegal on the federal level, 33 states now allow its sale at least for medical purposes. Ten of them, including California, have legalized recreational use. And as new markets open and capital continues to flood in, the cannabis industry has become, by some measures, one of the country’s fastest-growing job sectors.