When faced with direct competition, it's often easier for corporations to defeat the threat by purchasing the competitor than by actually improving their products or lowering their prices. While unprofitable, Dollar Shave Club does have many customers who in turn don't buy Unilever products. The natural outcome of this is Unilever raising the prices of Dollar Shave Club and their other razor products to recoup the costs and make up for lost profit. Is that fair? No, but that's the corporate structure the US government encourages, so complain to your senator and not to the company.
While profitability is undoubtedly an important driving factor in getting businesses off the ground, successful executives can soon become more interested in expanding their sphere of influence and impressing others with their trendy portfolio. A successful person can only own so many houses, cars and yachts; once material needs have been more than satisfied their lives can become more about power and control.
Apparently, a larger empire is more important to Unilever executives if they are buying up unprofitable companies. Maybe they have other plans for the Dollar Shave Club or see a bright future for them, but usually companies are bought because they turn a nice profit. Having a larger empire may have benefits that I, a non-executive, do not see.
While the decision to buy Dollar Shave Club is mostly a decision to expand the reach of Unilever's business in the the direct to home mailing market, there is an opportunity that may pan out. By acquiring this business they gain those subscribers, subscribers that may be open to buying even more products from Unilever that can be delivered to their door monthly.