Target Corp. has found a strange bedfellow in Casper, the online mattress-in-a-box company whose products the Minneapolis-based retailer began carrying on its website over the weekend.

The fast-growing mattress company confirmed this week that Target was the lead investor in a $170 million round of funding. Besides Target, others participating in the round include various investment firms as well as A-list celebrities such as actor Kevin Spacey, rapper Curtis “50 Cent” Jackson and basketball player Carmelo Anthony.

The move surprised some industry insiders who noted that Target doesn’t sell mattresses in stores — only on its website — and is only going to initially showcase them in about 35 of its 1,800 stores. The products are also available through Casper’s website as well as Amazon and West Elm.

Target is also rolling out displays to many of its stores this week featuring Casper’s sheets and pillows as well as two items that will be exclusive to the retailer — a mattress topper and lounger.

“It’s a little bit puzzling to me,” said Brian Yarbrough, an analyst with Edward Jones, of Target’s investment in the company.

He noted that the mattress industry is quite competitive and has seen a lot of bankruptcies.

Casper is looking to boost brand awareness and is reportedly aiming for an initial public offering down the road. It’s one of several online companies such as Leesa, Purple Mattress and Tuft & Needle that have been shaking up the industry.

But Yarbrough added that this investment does align with one of Target’s key areas of focus — the home category. While Target has sold various mattresses online in the past, Casper is now the only brand it is selling online as part of the agreement. The mattresses range in price from $550 for a twin to $1,150 for a king.

“Target is investing in Casper because we believe in their team and their vision,” Amy Koch, a Target spokeswoman, said in a statement. “The Casper team has truly disrupted the sleep category and at Target, we’ve been impressed by their ability to innovate and create new possibilities in an area of retail that has been somewhat unchanged for a long time.”

She added that Casper, like Target, is interested in figuring out how to connect online and offline retail experiences.

“We believe working with Casper will uncover insights and open up possibilities on both sides,” she said.

Neither Target nor Casper disclosed the size of Target’s investment, but Recode reported, and a source confirmed, that Target contributed $75 million. That makes this one of Target’s largest investments in outside firms in recent years.

Earlier this year, Target also was the lead investor in a $3.7-million seed round for Inspectorio, a start-up that helps retailers keep on top of factory inspections.

But Target has mostly stayed on the sidelines when it comes to big investments and acquisitions while some of its biggest competitors have made splashy announcements of late amid the rapid shift to online shopping. Last week, for example, Amazon announced plans to purchase Whole Foods for nearly $14 billion and Walmart acquired men’s apparel retailer Bonobos for $310 million.

The investment issue aside, Leon Nicholas, an analyst with Kantar Retail, said it’s smart for Target to broker merchandising partnerships with online-focused brands as it has also done with Harry’s, the men’s shaving brand that is sold only online and at Target stores.

“I wouldn’t be surprised if we saw this as a sort of model for them,” he said. “The idea of being an exclusive brick-and-mortar provider opens up some possibilities in an otherwise difficult time for Target.”

While Target’s future in food remains unclear as it continues to reposition its offering in the increasingly competitive category, he added that Target has been doubling down in more discretionary categories such as home and apparel.

Target is planning to roll out a dozen new exclusive brands over the next two years and is also overhauling its supply chain and updating many of its stores as it looks to revive sales, which have been on the decline in the past year.

Casper did not respond to multiple requests for comment. But it said in a news release that it will use the new funding to launch a design lab in San Francisco and to pursue other brick-and-mortar opportunities. It also noted that the three-year-old company doubled in annual revenue last year to more than $200 million.

“Innovation has always been our catalyst for growth,” Philip Krim, Casper’s chief executive, said in a statement. “As we look ahead to Casper’s next chapter, we see the future of sleep driven by unparalleled [research and development], and an evolved consumer experience.”