Here's why:
* Missing article: You need an article before "desks" because it's a plural noun. You could say "The teacher moved all the desks" or "The teacher moved all of the desks".
* Redundant "of": While "all of the desks" is grammatically correct, it's a bit clunky. "All the desks" is simpler and more natural.
Corrected Sentence:
The teacher moved all the desks.