There is no safe dead code removal. If the code being removed has any effects in it (the encoding of which is possible in a pure language), the fact that it's unreachable could be a bug. If you sneakily just remove it without telling the user, you're colluding with the bug.
Recently, I discovered an like-new pair of shoes at the bottom of a closet. I bought them some four or five years ago, I guess, and somehow forgot about them. They got buried under other items. This was a day or two before Christmas; it was like an unexpected present.
Now, someone could have surreptitiously entered my home at any time before that and removed these "dead shoes". I would never have known.
So therefore, it wouldn't be stealing, right? It's a "semantics-preserving transformation of someone's belongings".