For PhD students: If the advisor conducts the research, the student must not submit that research as part of their thesis. If the advisor did the research, it does not matter who did the writing: for the student to include it in their PhD thesis would be plagiarism if unattributed or, if attributed, fail to meet the standard required for a PhD. A PhD student in this situation should respond by expressing a desire to demonstrate their ability to work independently.
If it is not a PhD thesis but at a lower level, it might be okay for a student to write about someone else's research if proper attribution is given.
If the student did the research but the advisor wrote it up, this is not ideal. However, in some disciplines it may be considered acceptable for an advisor to give extensive writing assistance to PhD students.
And how can a student rewrite it any better than what someone with so much experience has written?
Probably the goal is to rewrite it to be in your own words, not to rewrite it to be better.
I would suggest outlining the writing, and then changing the structure of the outline. Check the new structure with your advisor to make sure it is acceptable. Then rewrite according to the outline.