A few years ago, I helped a well-known consumer technology brand through a very difficult time.

The company had enjoyed years of success and become one of the hottest brands on the planet. It raised hundreds of millions of dollars from Silicon Valley’s top investors, and had some of the top names in tech on its board.

Then it began to stumble. Eventually, it became clear that the company either needed to raise capital or sell itself.

The problem? Growing pains.

Instead of focusing on profitable growth, the company had scaled and expanded at all costs. It was constantly pivoting, revising its strategy, and losing focus. This came back to haunt the brand as stories of product failure, production woes, financial struggles, and unpaid contractors emerged.

It got to the point where the more product the company sold, the more money it lost.

A Foundation of Profitability Outlasts the Initial Buzz

In May, fashion e-tailer Lulus raised $120 million to fuel its expansion. The company was built on the foundation of profitability, and it shows—Lulus has been profitable from its first year.

Accordingly, the company has been growing at a rate of roughly 50% per year. It also has very meaningful EBITDA margins.

Part of Lulus’ focus on profitability stems from its Chico, California headquarters. Chico is relatively isolated from the piles of venture money in San Francisco and New York. This culture includes a heavy reliance on data to order clothes more efficiently, thereby sidestepping the expense of unused merchandise.

In contrast to Lulus, Stitch Fix has seen its profitability drop. As the initial buzz from social media and word of mouth wore off, the company’s margins dwindled. This has forced the brand to make greater sales and marketing investments.

When their initial viral marketing dies down, companies need to find a way to maintain momentum and avoid churn—especially in the era of easily distracted internet shoppers.

In Stitch Fix’s case, the challenge was that the brand’s existing customers were spending less the longer they were on the platform, and new customers had become less valuable altogether.

Rapid Expansion Could Spread You Too Thin

Good Eggs was created to transform the way people eat. Designed to make it easier for customers to buy organic foods produced by independent, local vendors, the company allows consumers to go online and purchase produce, meats, dairy products, and more from local farms. Good Eggs handles all the packaging and delivery.

Customers immediately flocked to the brand. In its first 18 months, it expanded from San Francisco to Los Angeles, New York, and New Orleans. Most of the capital it had raised was slated for Good Eggs to continue entering new markets.

But rather than expand, the company had to contract. Nearly 140 employees were laid off. It had grown too quickly.

And yet, Good Eggs still had to meet the challenges of delivery and logistics in demanding metropolitan cities. The company simply couldn’t handle building entirely new food supply chains in complicated markets—at least not at the time.

Had Good Eggs ensured sound economics before it expanded, the company could have enjoyed a head-start in new markets.

Your Revenue Model Might Lead to Unprofitable Growth

Similar to the consumer tech company described at the beginning of this post, ClassPass reached a point where the more classes its users took, the narrower its margins became. There were some months the company actually experienced negative margins.

ClassPass struggled to build a sustainable business model, particularly after it introduced a $100 unlimited monthly membership option in 2015. When it realized this price point was no longer sustainable, the company instituted a $180 monthly payment—and lost 10% of its user base as a result.

The original promise of ClassPass was to give people unlimited access to a variety of fitness classes. (The company only pays its fitness boutique “suppliers” for classes attended.) And since consumers have different usage patterns—some may go to a handful of classes over the course of several months, while others attend a class every day—a flat monthly rate meant that low-usage customers were paying a premium to subsidize the cost of their high-usage counterparts.

That said, because the company reduces the friction of attending an exercise class, the product itself catalyzes more frequent workouts. This resulted in initially low-usage customers working out more and more the longer they were on the ClassPass platform.

Suddenly, a larger-than-anticipated portion of consumers had become high-usage.

The implications of this? A significant chunk of negative gross margin users.

Work Toward a Future Beyond the First Wave of Growth

Birchbox experienced rapid growth because its subscribers were eager to try new beauty products. The brand is predicated on the hope that by selling samples, users will buy the full-size versions later on.

Many consumers followed through and purchased the full-size products.

The problem was that these customers stopped buying when they realized they didn’t actually need the product or service. As a result, the company has had to decide whether to reactivate its lapsed customers, or find new customers entirely.

To complicate matters, Birchbox’s margins continued to erode as it struggled to find the capital to locate new, more profitable growth avenues. Eventually, the company had to make multiple rounds of layoffs and cease its expansion plans.

This doesn’t have to be the case for your company, though. I recently heard Reid Hoffman and Allen Blue explain that investors initially dismissed their aim of quickly building scale before presenting users with a revenue model. What was brilliant about the LinkedIn model is that the company’s first wave of growth was a means to an end—as in, a clear path to the second wave of growth, followed by the third, and then the fourth, etc.

Once it built scale, LinkedIn cemented itself into an ecosystem that provided valuable network effects. Users—both individuals and corporates—couldn’t afford to be without it, and were willing to pay for incremental services and functionalities.