I think it might have to do with choice.
You don’t have a choice about HSA contributions contributed by your employer in most cases. You have a choice about HSA contributions you choose to make.
I’m guessing, but this is what happens with some publicly funded retirement plans like teachers retirement. These amounts are not added back in as income because the teacher has no choice about the contribution amount. It is mandated by the state.