Once booming, direct-to-consumer companies such as Casper, Allbirds and Peloton now struggle with profitability, layoffs and the cost of advertising.