It’s a fair point, but as a thought experiment, how would you feel about AI writing the essays and simply regurgitating those? Legal but not in the spirit of things I think.
The point is that your friend did all this effort to write those essays, which (supposedly, and I believe it) actually caused them to "learn" the material.
We are often changed in the process of doing thing, weather working out or thinking through concepts.
Your claim here is about like claiming you get the same workout regardless of if you drive a mile or ran a mile because you have changed positions using either method.
Don't see how it's legal (by the way, neither is the original method, the exam is legally about doing a task in the same conditions of having a set time as place)