Some investors may not like the fact that Penn Entertainment Inc. (PENN -1.92%) completed an acquisition earlier this year -- only to turn around and sell the business back to its founder months later for a symbolic dollar. But this may not be as negative as it sounds. In fact, it may have actually been the right decision, and one that will lead to growth for the company's online sports betting business.

Penn operates casinos and hotels, and these businesses actually generate most of the company's revenue. But, as more and more states legalize sports betting, strengthening its presence in this market could be a very smart idea. So, is Penn, down 30% this year, a buy considering its recent decisions and prospects down the road? Let's find out.

A big move in sports betting

First, a bit of background. Penn owns 43 casinos and racetracks and more than 7,800 hotel rooms throughout North America, and it offers sports betting in 16 jurisdictions. The company's big move in the sports betting arena came three years ago when it struck a deal to buy Barstool Sports from founder Dave Portnoy. The company completed the deal earlier this year, spending a total of more than $550 million on the acquisition.

Through the Barstool Sportsbook, Penn offered a wide variety of betting opportunities to sports fans around the country. The U.S. online sports betting market, expanding at a compound annual growth rate of about 17%, is expected to reach more than $14 billion in 2027, according to Statista. And these platforms may attract more than 49 million users, up from 6.9 million users in 2019, the data show.

So, this could be a key area of growth for Penn. Last year, interactive revenue, which includes sports betting, only made up about 10% of the company's total revenue. But this figure could move higher if online sports betting grows as forecast this decade.

Now, let's move on to the Barstool situation. In August, Penn decided to return the company to Portnoy as it struck a deal with Disney's ESPN sports network to rebrand its sportsbook. Penn will pay $1.5 billion to ESPN over the 10-year agreement period, which could be extended. In return, Penn gains exclusive rights to the ESPN Bet trademark for online sports betting and benefits from ESPN's promotional services and talent. Penn is rebranding Barstool Sportsbook to ESPN Bet this fall.

Penn says the agreement could result in $500 million to $1 billion in annual adjusted EBITDA in the interactive segment over time. If Penn even reaches the lower end of this range, the investment could be a winning one.

Was Barstool a mistake?

So, was the Barstool investment a mistake? Well, it helped Penn grow in the sports betting industry -- for instance, Barstool Sports increased its audience by 194% since Penn's initial investment. And even if the acquisition and subsequent divestiture were costly, the new deal with ESPN could more than compensate in terms of revenue and EBITDA in the coming years. ESPN, a top sports brand, represents a very valuable partner. All of this means it may be a good idea to focus on the potential of this deal rather than how the Barstool acquisition turned out.

Meanwhile, it's key to examine Penn's overall financials too. The company has grown earnings in recent years, and at the same time, the share price has declined.

PENN Chart

PENN data by YCharts

In fact, trading at about 5 times forward earnings estimates, it's a lot cheaper than certain rivals.

PENN PE Ratio (Forward) Chart

PENN PE Ratio (Forward) data by YCharts

Now, let's get back to our question: Is Penn a buy right now? It depends on your comfort with risk. If you're a very cautious investor, you may want to wait and see how Penn's newly branded sportsbook progresses over the next couple of quarters. Any such transition or change does involve some risk.

If you're a bit more aggressive though, you may consider buying a few Penn shares at today's very reasonable valuation. If the ESPN partnership is successful, Penn could thrive in the high-growth online sports betting market -- and score multiple jackpots for investors over time.