Why does basic hypothesis testing focus on the mean and not on the median? In basic under-grad statistics courses, students are (usually?) taught hypothesis testing for the mean of a population.
Why is it that the focus is on the mean and not on the median? My guess is that it is easier to test the mean due to the central limit theorem, but I'd love to read some educated explanations. 
 A: Because Alan Turing was born after Ronald Fisher. 
In the old days, before computers, all this stuff had to be done by hand or, at best, with what we would now call calculators. Tests for comparing means can be done this way - it's laborious, but possible. Tests for quantiles (such as the median) would be pretty much impossible to do this way.  
For example, quantile regression relies on minimizing a relatively complicated function.This would not be possible by hand. It is possible with programming. See e.g. Koenker or Wikipedia.
Quantile regression has fewer assumptions than OLS regression and provides more information. 
A: I would like to add a third reason to the correct reasons given by Harrell and Flom.  The reason is that we  use Euclidean distance (or L2) and not Manhattan distance (or L1) as our standard measure of closeness or error.   If one has a number of data points $x_1, \ldots x_n$ and one wants a single number $\theta$  to estimate it, an obvious notion is to find the number that minimizes the 'error' that number creates the smallest difference between the chosen number and the numbers that constitute the data.  In mathematical notation, for a given error function E,  one wants to find $min_{\theta \in \Bbb{R}}
 (E(\theta,x_1, \ldots x_n)  = min_{\theta \in \Bbb{R}}(\sum_{i=1}^{i=n} E(\theta,x_i)) $ .  If one takes for E(x,y) the  L2 norm or distance, that is $E(x,y) = (x-y)^2 $ then the minimizer over all $\theta \in \Bbb{R}$ is the mean.  If one takes the L1 or Manhattan distance, the minimizer over all $\theta \in \Bbb{R}$ is the median.  Thus the mean is the natural mathematical choice - if one is using L2 distance ! 
A: Often the mean is chosen over the median not because it's more representative, robust, or meaningful but because people confuse estimator with estimand.  Put another way, some choose the population mean as the quantity of interest because with a normal distribution the sample mean is more precise than the sample median.  Instead they should think more, as you have done, about the true quantity of interest.
One sidebar: we have a nonparametric confidence interval for the population median but there is no nonparametric method (other than perhaps the numerically intensive empirical likelihood method) to get a confidence interval for the population mean.  If you want to stay distribution-free you might concentrate on the median.
Note that the central limit theorem is far less useful than it seems, as been discussed elsewhere on this site.  It effectively assumes that the variance is known or that the distribution is symmetric and has a shape such that the sample variance is a competitive estimator of dispersion.
