The decoding step (output of final layer -> word) is not strictly needed. You can feed the output directly into the next layer (Chain of Continuous Thought). You can 'decode' the output into things other than words.
You input text into the system, that moves through layers as chains of weights. Sure it doesn’t ever have to be output as text, but for the text-in-text-out machine to have any impact on the world around it, text must be generated.
We could find common vectors in the space of common output tokens, which would serve as new words.
We could decode the output tokens into other actions (like a boolean output 'is safe / is unsafe input').