How is real wage growth achieved? Someone asked a simple question: when wages increase, why don't companies just raise prices such that it cancels out the wage increase?

Of course, this isn't what happens in real life since real wage growth exists. But what's the best way to intuitively explain why that's the case?

A simple explanation could be that the demand curve shifting outward due to higher wages leads to an increase in quantity and price, but that's just from looking at lines on a graph.
Why would companies want to "cancel out" the wage increase? Their goal is to make money, not to keep real wages constant.

Many things factor into the pricing decisions of companies. There are competitive pressures: if rival vendors are decreasing prices the company has to follow suit or lose market share. There are also cost factors: if the price of an input (e.g. labor) rose, than the company may have to increase prices to stay profitable, or just to achieve maximum profit.

If technological improvements, economies of scale, or similar factors enable the company to produce the same quantity of goods at a lower cost, they can afford to decrease prices while keeping wages the same. This enables real wage growth. There are several similar scenarios where prices rose, but nominal wages rose even more.