Q:

Why should the preposition be included or omitted in this example?

"Where did you get this from?"
  "Where did you get this?"

Which one is correct and why? 
According to the textbook, the first one is incorrect. Please explain.

A:

From could be considered an extraneous preposition and should be omitted.
The relevant rule from the linked article above is:

Just remember, if the sentence means the exact same thing after you omit the final preposition, then just let it go, man.

In speaking it is common to include these as a form of slight emphasis.

