Meal kit delivery company Blue Apron Holdings Inc.  (APRN)  opened trading on Thursday morning at $10 per share, exactly the level of its heavily discounted IPO price reached on Wednesday evening. While many have been critical of the money-losing company, its business isn't in as bad shape as it seems. But there are certainly some big storm clouds on the horizon.

It's easy to be a cynic about a firm like Blue Apron. After all, an unprofitable company whose business involves delivering gourmet meal kits that customers have to cook themselves before eating sounds like something straight out of the Dot.com bubble (anyone remember Kozmo.com or the original Peapod?).

A look under the hood, however, tells a somewhat different story. It shows a company that has delivered impressive growth by providing a fine-tuned service that a certain type of upscale, time-constrained consumer finds genuinely useful. And one that might not be far removed from profitability if it can get its recently-heavy spending growth in check.

To a large degree, Blue Apron's main problem isn't where its business stands today, but how it will look if and when retail giants with large customer bases, tremendous brand power and major cost advantages encroach on its turf. That concern definitely doesn't seem lost on the institutional investors providing a wary response to the company's pre-IPO roadshow.

After initially setting a $15 to $17 IPO price range, Blue Apron priced its offering at a mere $10. That values the online meal-delivery firm at just over $2 billion after accounting for about 12 million stock options exercisable under a 2012 equity plan. In other words, Blue Apron is basically receiving the same valuation it got in a 2015 funding round. Three hundred million dollars is being raised by selling 30 million shares; underwriters have an over-allotment option to buy another 4.5 million.

At $2 billion, Blue Apron would be valued at 2.5 times 2016 revenue of $795 million, and (given its growth rates) perhaps less than 2 times its 2017 sales. For a business that posted 42% annual sales growth in Q1 and had a roughly 30% gross margin, those are pretty reasonable multiples at first glance.

They get more reasonable when one considers that Blue Apron could have easily been profitable last year -- it reported a net loss of $54.9 million, or roughly 7% of sales -- had it curtailed its marketing spend. Of the $144.1 million that Blue Apron spent on marketing in 2016 (up 180% from 2015), $66 million consisted of offline media spend that was largely discretionary. There's also probably some room to cut the $43 million that was spent on online ads, though some of this spending is necessary for driving sign-ups. The remaining $35 million was spent on Blue Apron's customer referral program, and needs to viewed as a recurring expense.

For now, Blue Apron continues spending heavily on marketing, as it tries to grow its brand awareness and cement a leading position in its niche. Marketing spend rose 139% in Q1 to $60.6 million. That, along with a 113% increase in product, technology and G&A spend caused by aggressive hiring and fulfillment center-building (perhaps too aggressive), resulted in a $52.2 million quarterly loss, a reversal from the year-ago period's $3 million profit.

But while heavy spending is a legitimate concern, many of Blue Apron's top-line metrics look reasonably healthy. The company, which sells meal plans that provide two to four meal kits in a week for couples and families (users can skip any week they want), produced $244.8 million in revenue in Q1. The revenue came from 4.27 million orders delivered to 1.02 million customers (4.1 orders per customer) carrying an average order value (AOV) of $57.23. Quarterly AOV and orders per customers have remained fairly steady since early 2015, even as orders and customers have grown by a factor of five.

Churn does appear to be significant -- Emory University professor Daniel McCarthy estimates that 60% of Blue Apron customers stop using the service within six months. But it's not all that unusual compared with what many restaurants and online retailers face. And those that stick around generally spend a decent amount.

Including customers that stopped using the service well before the timeframe in question was up, Blue Apron reports historically getting an average of $410 in net revenue -- defined as revenue minus a meal's cost -- per customer during the first six months following an initial order, and $606 during the first 12 months. That's well above the company's historical $94 marketing cost per customer (CPC), though it's worth noting CPC is probably rising due to the recent marketing binge.

Blue Apron seared cod.
Blue Apron seared cod.

Blue Apron's service isn't for everyone. Many of those who try it out clearly decide they'd rather stick to preparing meals the old-fashioned way. Or perhaps -- for a higher price, on average -- order fully prepared and cooked meals via services such as GrubHub (GRUB) and Amazon.com Inc.'s (AMZN)  Amazon Restaurants. But for a subset of consumers that like the idea of creating home-cooked meals while being spared the trouble of shopping for all the necessary ingredients, it seems to get the job done.

The question is how much of a moat Blue Apron has to protect itself against the inroads of an Amazon or a Walmart Stores Inc. (WMT) , should those companies decide that selling ready-to-cook meals online is a business that interests them. For now, Blue Apron, aided by a large rotating menu of meals and a strong distribution footprint, is doing a good job of fending off meal-delivery startups such as HelloFresh, Plated and Green Chef. But taking on some of the biggest names in online retail and/or grocery sales is another animal altogether.

Amazon, now set to buy Whole Foods Market Inc. (WMT) and its 464 grocery stores, looms especially large. The demographic overlap between Blue Apron customers and both Whole Foods shoppers and Amazon Prime subs appears to be significant. Whole Foods' stores and inventory could be paired with Amazon's fulfillment infrastructure to launch a meal-delivery service with a much better cost profile than Blue Apron's -- especially when one considers Amazon's ability to market the service to Prime subs at little to no cost. And it's safe to assume that Jeff Bezos' company would use any cost advantage it has to undercut an entrenched rival.

Walmart, possessing a giant retail footprint and a grocery business with huge economies of scale, could also get involved, both through a delivery and a pickup service. The large self-service pickup kiosks it's experimenting with for online grocery orders would certainly help with the latter. That said, from a branding and demographic perspective, Walmart isn't as well-positioned to take on Blue Apron as Amazon and Whole Foods.

On the other hand, online grocery delivery startup Instacart, valued at $3.4 billion in a March funding round, is an intriguing dark horse. Instacart currently sells groceries from Target Corp. (TGT) , Safeway Inc. (SWY) , Kroger Co. (KR) , Whole Foods (for now) and a slew of smaller retailers. There's little to reason to think that Instacart couldn't start delivering meal kits on behalf of one or more of its retail partners. Pricing could be quite competitive for meal kits sent with larger orders made through the Instacart Express service.

All of this does much to explain why Blue Apron has been hiking its marketing and fulfillment center spending so aggressively. The company appears intent on becoming as big as possible, and known by as many potential customers as possible, before some big, well-heeled rivals arrive.

Visit here for more of the latest business headlines.

More from Stocks

Focus on Protecting Capital Rather Than Predicting the Next Market Move

Focus on Protecting Capital Rather Than Predicting the Next Market Move

PayPal, Tesla, Honeywell, P&G and DowDuPont - 5 Things You Must Know

PayPal, Tesla, Honeywell, P&G and DowDuPont - 5 Things You Must Know

Making Sense of Credit Card Earnings, Apple, P&G: 3 Keys to Your Trading Day

Making Sense of Credit Card Earnings, Apple, P&G: 3 Keys to Your Trading Day

Market Movers: Tech Earnings

Market Movers: Tech Earnings

Cloud Gaming Adds Growth Opportunity for Microsoft

Cloud Gaming Adds Growth Opportunity for Microsoft