What happened

Palo Alto Networks (PANW 0.97%) shareholders beat the market this week. The stock gained 12% through Thursday trading compared to a 0.7% decline in the wider market, according to data provided by S&P Global Market Intelligence.

The rally added to a great year so far for owners of the cybersecurity specialist. The stock has gained 3% in 2022 compared to a 13% slump in the S&P 500. It was spurred by good news on the earnings front.

So what

Palo Alto Networks said in a Monday press release that revenue rose 27% in the selling period that ended in late July. That result beat the upgraded guidance that executives had issued a few months earlier and reflected robust demand across several of its network and remote access security products. "We were pleased by our fourth-quarter results," CEO Nikesh Arora told investors.

Wall Street was even happier to see that the company generated net profits for the first time in several years. Progress on this score had been encouraging, as the software-as-a-service selling model first focuses on cash flow that eventually translates in rising earnings.

Now what

The combination of faster growth and expanding profitability could lead to positive investor returns. However, the business still faces intense competition in each of its operating segments.

Through mid-2022, Palo Alto has demonstrated a knack for making its services more attractive to enterprise clients despite other options available on the marketplace. And the wider cybersecurity industry will likely expand for many more years as more business activity moves online.

Those optimistic factors all help explain why this stock is outperforming the market right now. The biggest knock against the business is that shareholders haven't yet seen sustainable profits from Palo Alto Networks. But that weakness could disappear as soon as fiscal 2023.