There's no question that Target's (TGT -3.09%) second-quarter results left a lot to be desired.

The retail giant's profits plunged as poor inventory planning led to aggressive markdowns in discretionary categories. Target had indicated that the bottom line would take a hit as it made the decision to clear inventory, but the bite to profits was worse than expected.

In June, management had said it expected 2% operating margin in the second quarter, but instead, Target reported just 1.2% operating margin, way down from the 9.8% it reported in Q2 2021. A steep decline in gross margin, which fell from 30.4% to 21.5% primarily due to efforts to clear inventory, was the main reason for the operating margin drop.

As a result, adjusted earnings per share came in at just $0.39, down from $3.64 in the quarter a year ago and below the average analyst estimate of $0.72. Revenue growth was decent, with comparable sales up 2.6%, and overall revenue growth of 3.5% to $26 billion matched the consenus, but after Walmart had beaten its own lowered guidance earlier this week, investors were disappointed that Target didn't do the same, and the stock fell as much as 5.2% on Wednesday morning.

Still, in spite of the disappointing results, there are number of reasons to remain bullish on Target.

The hard part is over

Like many of its retail peers, Target overstocked its inventory in anticipation of potential supply chain delays and because it overestimated consumer demand trends in areas like home goods and electronics. In the second quarter, Target essentially total inventory dollar value flat from the first quarter, finishing Q2 at $15.3 billion, but it realigned its inventory with current demand and cut down on storage costs. 

Management said on the earnings call that the space occupied by its inventory is down 20% and that the vast majority of the impact of its inventory write-downs and other decisions is behind the company. It also expects its fall inventory peak to be lower than the spring one, even though the stock-up ahead of the holiday season is typically the biggest, further evidence that the worst of the inventory challenges has passed.

Target's guidance for the second half of the year showed it expected profits to recover, as it expects an operating margin of 6%, in line with its historical average, and revenue growth in the low-to-mid-single digits.

The long-term strategy remains intact

Target stock has been a top performer in the retail sector in recent years as the company has developed a number of differentiated competitive advantages. Even after its plunge earlier this year, the stock has still doubled over the last three years and tripled over the last five.

It's delivered strong earnings growth by investing in same-day fulfillment services, something it's in a unique position to excel at because it has stores that serve all demographics (urban, suburban, rural) in all 50 states. Rivals like Walmart, Costco, and Amazon, on the other hand, can't match that geographic exposure. Target also delivers higher margins than those competitors because its store-based fulfillment strategy makes a more efficient use of its stores than shipping online orders from a fulfillment center. Finally, it's grown by opening small-format stores in underserved neighborhoods in cities and college towns and by investing in its owned brands, which help reinforce customer loyalty and deliver higher margins than name brands. 

Over the long term, the company expects to deliver high-single-digit growth in adjusted EPS, which, combined with a growing dividend that currently yields 2.5%, will give investors double-digit annual returns.

Target stock is well priced

The market punished Target for weak results and a guidance cutback in its first-quarter earnings report in May, sending the stock down 25%, but the inventory troubles are short-term headwinds that should be gone within the next quarter or two. In a healthy economy, Target should be able to deliver operating margins of at least 6%, and the stock looks cheap if you believe its performance can get back to full health. Last year, the company brought in adjusted EPS of $13.56, which gives the stock a price-to-earnings ratio of just 13.

For a retailer that has a number of clear competitive advantages, is a Dividend Aristocrat currently paying a 2.5% yield, and has easily outperformed the market in recent years, that price looks like a bargain.