PepsiCo and Lil Wayne ended their commercial relationship last week over vulgar lyrics the rapper used in a song. Wayne’s reference was to slain civil rights figure Emmett Till in his remix of “Karate Chop.”

LOS ANGELES — Corporations are quick to recruit rappers to sell their soft drinks, shoes and smartphones — but the moment there’s a whiff of controversy, they are just as quick to cut them loose.

The latest example is PepsiCo and Lil Wayne. The soft drink company recently announced it had ended its relationship with Wayne, one of the biggest-selling rappers in music, over a vulgar sexual reference to slain civil rights figure Emmett Till in a remix of Future’s hit, “Karate Chop.”

Wayne’s controversy followed similar flaps between PepsiCo and Tyler, the Creator over a video ad the rapper created that some deemed racist and sexist, and Reebok and Rick Ross after he rapped about slipping a party drug in a woman’s drink and taking her home.

Peter Sealey, a professor at Claremont Graduate University and a former head of marketing at Coca-Cola, said events like these prove how out of touch corporations can be when trying to appeal to younger demographics.

“When you market to youth, there is a perennial battle in pushing the envelope without crossing boundaries,” Sealey said. “And when they do, they throw them under the bus. It’s hypocritical … but these guys in their late 40s don’t know who the hell these people are.”

Sealey says the hiring of potentially controversial rap artists also represents a generation gap within the corporations. “If (Tyler’s ad) had been seen by senior management, no way would that have gotten out.”

PepsiCo declined to comment for this article, and requests for comment from Reebok went unanswered, but a person with knowledge of the deal who isn’t authorized to speak publicly said Wayne’s partnership with the soda company was worth more than $7 million, and Ross stood to make $3 million to $5 million with the athletic company.

Ryan Ford, vice president of L.A.-based Cashmere Agency, has helped rappers including Snoop Dogg and Kendrick Lamar secure lucrative partnerships with brands such as Adidas, Samsung and Pepsi.

“Artists by their nature have a responsibility to be creative. Sometimes to achieve that, whether you’re a rapper or performer, you push boundaries,” he said. “When you take that unbridled creativity and attach it to a brand, the brand has very different motives.”

Add to the mix social media, which are now playing a critical role in highlighting the more dysfunctional relationships that develop when art tangles with commerce, and these odd partnerships are being scrutinized much more frequently and in a bigger arena than in the past.

The feminist group Ultra Violet placed ads against Ross via Facebook and Twitter and garnered more than 100,000 signatures on a petition to have him dropped by Reebok. Till’s family took to YouTube to urge the public to boycott Mountain Dew, the PepsiCo product endorsed by Wayne, and both Tyler and Ross used Twitter to defend themselves during their controversies.

Casey Neistat admits that the logistics of running a business isn’t his speciality. Instead, he shared with Denver Startup Week audiences how he went from high school dropout to an HBO show, a New York Times partnership and later, an app that got started while on a fellowship at the Massachusetts Institute of Technology.

Twitter is defending its decision not to remove a controversial tweet by President Donald Trump on Saturday that targeted North Korea, in a six-tweet response to critics who argued that Trump violated the platform’s rules.