Nike is breaking up with Amazon.

The sneaker retailer said it will no longer sell merchandise through the e-commerce giant's website, in a bid to focus on Nike's own direct-to-consumer business. The news is setting off alarm bells in the retail industry, with some speculating other brands could follow Nike's lead. And some say they'd be smart to do so.

"Brands don't need Amazon," Jefferies analyst Randy Konik said. "Amazon had a delivery speed advantage, but that advantage has compressed. With Nike leaving the Amazon platform ... it strengthens our view that retailers/brands won't be displaced by Amazon."

"The move shows us that strong brands realize that traffic driven to their own site (e.g. NIKE.com) is self-sustaining, more profitable, and actually brand enhancing, while traffic and incremental revenue from Amazon.com is less profitable but also less brand enhancing," Konik said. "We believe many strong apparel (and even non-apparel) brands will continue to avoid or curb their relationships with Amazon in the future."

Amazon has been trying to become a bigger name in fashion, but many argue its site is still difficult to navigate and especially to discover new brands. It's also often difficult to determine if items are being sold by third parties or directly from the brands that make them.

In recent years, Amazon has courted brands including Nike, PVH's Calvin Klein, Chico's, Sears and J. Crew to sell there. It worked with influencers ahead of Prime Day to push fashion deals. It recently started mailing out its first holiday catalog focused on its fashion offerings.

But Konik contends, "Amazon is just a traffic aggregator that reduces friction in consumption ... it doesn't build communities."

Amazon didn't immediately respond to CNBC's request for comment.

"The 'Amazon threat' has now been proven to be overblown," Wells Fargo analyst Tom Nikic said in a note. He added that pressure on Foot Locker, one of Nike's top wholesale partners that it still relies on, should be "alleviated."

Evercore ISI analyst Omar Saad said he wonders if other brands "will follow" Nike's lead.

Nike shares were up 1.8% on Wednesday afternoon, while Amazon was down 1.6%.

— CNBC's Michael Bloom contributed to this reporting.