Overfunded pension plan and shareholders of a company

Why does an overfunded pension plans benefit the shareholders of a company?

I mean it’s not the shareholder’s money. I don’t think they can take that money to pay out the shareholders in dividends.
Shouldn’t the status of a pension plan status be neutral for the shareholders?

  • Doesn’t show up as a liability on the BS - better leverage profile
  • Reduces contribution vol so the company doesn’t have to put cash into the plan so it can invest in company for benefit of SH