They can't really help but do otherwise. Companies certainly aren't going to be able to proactively raise salaries based on future inflation expectations, and precisely matching inflation isn't an option when salaries are generally adjusted once a year. So lag it is.
Plus, with non-trivial inflation, things get complicated. Dollars cease to be fungible, and you have to consider how close to the "inflation sources" your company is. It is difficult to pay you an inflated salary if they still haven't gotten inflated prices for their own sales yet because they're "downstream" of the inflation. Or if they have to pay you with money from six months ago while you want a salary in current inflated dollars. Non-trivial inflation breaks a lot of casual expectations you may have about money under normal circumstances.