Imagine a person A worked on a project together with persons B, C..., and over time they all have dependence on each other code. If B, C etc. at some moment changed licensing of their code, but person A didn't, 1) A's work will become at least partially meaningless, as it depends on B, C... work 2) B, C... would be in violation of previous agreement with A (as at least some of their code depends on A's code).
Even worse, assume A doesn't want to significantly modify the project structure, and starts talking with B, C... asking them not to change the license. While it's formally possible to find last modifier for each line, it doesn't usually make much sense from programming logic point of view. So, NodeBB seem to get quite lucky getting everybody - at least everybody with complex contribution - simultaneously changing their license terms in accord. I'd assume in general it could be easier to rewrite all code.
Because we value the work our contributors have made to NodeBB. To rewrite to code would be (besides being hard) essentially to replace the attribution of the code from the original owner to a company employee, etc.
When a contributor assigns their contribution to us, we own it in a legal sense but we still very much want to let others know that they did it.
Why wouldn't you rewrite all lines of code instead?