Why isn't average speed defined as the magnitude of average velocity? Speed is usually defined as the magnitude of (instantaneous) velocity. So one could assume that average speed would be defined as the magnitude of average velocity. But instead it is defined as 
$$s_{\textrm{average}} = \frac{\textrm{total distance traveled}}{\textrm{total time needed}}$$
which generally speaking is not equal to the magnitude of the corresponding average velocity. 
What historical, technical or didactic reasons are there to define average speed this way instead of as the magnitude of average velocity? 
 A: You can compute the mean value of the velocity vector.
However, it turns out to be useless sometimes. A trivial example is a circular motion.
The mean velocity of a full loop in a circular motion is $\vec{0}$, as velocity is pointing in one direction at first, and $\pi$ radians later it's pointing in the opposite one, so their contributions cancel out. So the average "velocity" is $\vec{0}$.
Nevertheless, this is not giving us much information. In contrast, the ratio of "circumference" to "time elapsed" gives us the actual "mean speed".
Sometimes, anyways, it can be useful to give them both. The more information, the better.
A: The simple reason is that velocity can go negative, and this will affect the average. The clearest example of the difference would be a pendulum (or any other resonating system).
A pendulum swings backwards and forwards. It follows its track in one direction, accelerating, then decelerating to a momentary stop; and then reverses direction to repeat the exact same trajectory in reverse.
The pendulum follows the same path each time, in opposite directions. Since velocity is signed, the average velocity for going one way is exactly equal in magnitude to and the opposite sign to the average velocity going the other way. The average velocity is therefore zero.
The average speed of course will not be zero. It will be equal to the magnitude of the average velocity for one half of the pendulum's trajectory, because both halves have the same magnitude of velocity.
A: People already answered your question from a usefulness standpoint, but I just want to add that your reasoning isn't correct:

Speed is usually defined as the magnitude of (instantaneous) velocity. So one could assume that average speed would be defined as the magnitude of average velocity.

That's not how it works. If we have

[speed] = [magnitude of velocity]

then logic dictates that we should have

average [speed] = average [magnitude of velocity]

and not

average [speed] = magnitude of [average velocity]

and, indeed, this is what we have.
A: There error is the magnitude of velocity is not actually a definition, but is better appreciated as a consequence of the actual definition, and any materials that say it is are problematic study materials.
The actual definition of speed in both cases really is distance traveled over the time taken to travel it. It's just that in the case of instantaneous speed, the absolute value of velocity happens to be equal to the speed because the magnitude of the differential of arc length ($ds$) - i.e. the tiny increment of distance traveled - is the same as the magnitude of the differential of displacement ($d\mathbf{r}$), i.e. the vector from starting to current position. Mathematically, the correct definition of instantaneous speed is
$$\mathrm{speed} = \left| \frac{ds}{dt} \right|$$
and velocity
$$\mathrm{velocity} = \frac{d\mathbf{r}}{dt}$$
However now (for two dimensions at least) we have that $ds = \sqrt{dx^2 + dy^2}$, but also $d\mathbf{r} = dx\ \mathbf{i} + dy\ \mathbf{j}$. What is $|d\mathbf{r}|$?
A: It's quite simple really. "Average speed" is the average of the speed. In general, the average of any function $f(t)$ is
$$\frac{\int_a^b f(t)\ dt}{b-a}$$
In the case of $f(t)$ being the speed $s(t)$, The integral of the speed $\int_a^b s(t)\ dt$ gives the total distance traveled, and $b-a$ is the time elapsed, resulting in the formula you mention.
Thought of another way, "Average speed" is "average magnitude of velocity", which is quite different from "magnitude of average velocity" - The modifiers "average" and "magnitude" don't commute. There is no reason to use one term when you really mean the other. In other words,
$$\int_a^b\|\mathbb{v}(t)\|\ dt \neq \left\|\int_a^b\mathbb{v}(t)\ dt\right\|$$
A: As you wrote these quantities are different and give you different information so why would you want to call the magnitude of the average velocity the average speed?  
If you are travelling in a car it is the average speed for the journey which you might want even if the start and finish point were the same.
What use would it be to say that the magnitude of the average velocity was zero?
A: Given a velocity as a function of time, the speed as a function of time is the magnitude of the velocity at each point in time. The average speed is then the average of this magnitude, as it would be for any function of time - such as density or temperature. The question of whether the average magnitude of the velocity is equal to the magnitude of the average of the velocity then becomes a conjecture to check. Since an object can move around at high speed while returning to the same place, and so have an zero average velocity with a high average speed, this shows by counter example that the average speed, defined just like any other average, is actually not equal to the magnitude of the average velocity.
It is very common to find that the average of some function is not the function of the average. For example, the average $x^2$ is not typically the square of the average of $x$.
A: It is all said in the other answers. But I think it might be useful to restate
things formally for a different point of view, possibly new to a physicist
readership, thus requiring a more detailed explanation (apologies), and this is why I decided to make it an answer rather than a
comment as I originally intended.
This is really a question of linguistics, not physics.
You have two entities/quantities of interest in your physics discourse, the average of the speed over time, and the magnitude of the average velocity, and
you need to name them both. The way language works, at least in many systems
of language analysis, and particularly in programming languages, which are on
a level of formality that is similar to physics, is as follow (this is a gross
oversimplification, at least for natural language):
You have elementary concepts that are expressed by various names or symbols,
which form a vocabulary (with different categories: name, verb, scalar,
function,...). Then you have syntactics rules (grammar) that you use to to
build larger structures from elementary ones, such as expressions or
sentences. Functional meaning is associated to syntactic rules.
Then getting the meaning of an expression or sentence is done more or less by
considering that this meaning is a homomorphic image from the syntactic domain
of sentence to the abstract domain of meanings. The homomorphism is defined by
the correspondence between the elements of the vocabulary with elementary
entities, and between the syntactic rules and their functional meaning.
This has been actually used in a very formal mathematical way to define
programming languages.
This homomorphic approach, based on getting the meaning of the whole by
composing (according to grammatical syntax) the meanings of the parts, is the
essence, on a very trivial example, of the answer given by user541686
Now, people do not always respect syntax (just listen radio or TV). They can
also take expressions and arbitrarily decide (when they have power to do so)
that this meaning is other than what the homomorphism would derive. This may
even happen through evolution in the case of natural language. But it just
makes understanding things more complicated, possibly more prone to errors and
misinterpretations.
Thus, you do not get to decide what "average speed" is. The meaning of this
expression must be derived in a standard way from the functionnal meaning of
average, applied to the meaning of speed, in the same way that you would for
average pressure or average weight (well there is much that is implicit, and
language is seldom simple).
