The median student debt is a lot more interesting, it's much lower than $30,000. The median of all outstanding student debt is around $14,000 today (for households that have any student debt). The median debt for individuals that went to public universities is closer to $10,000.
The average is massively skewed by the top few percentage of all borrowers that have taken on almost unfathomable loans.
You're comparing two different cohorts - newly graduated students, and everyone who has any student debt. Obviously the second group is going to have lower median and average, so comparing the two is pointless.
Because I think HN likes data I plotted some for ease. We can see that by linear fit the cost grows 2.5 times that of the number of students. The 2015 cost of school is 3.5 times that in 1990. The 2015 number of students is 1.47 that of 1990 students.
What's interesting here is the average or median debt of just-graduated students though; counting those who already repaid almost all their debts isn't meaningful.
The average is massively skewed by the top few percentage of all borrowers that have taken on almost unfathomable loans.