Why does my college student need to pay taxes on earnings reported on 1099-Q form

My son started college last year.  We paid for his college from a 529 account directly to the university.  He has received a 1098-T form:  payments: $9481, Scholarship or Grants: $5857.

He has also received a 1099-Q form: Gross distribution: $11,188, Earnings: $2370,  Basis: $8818

He files separately.  Turbotax says that he owes money on his Federal because of the $2370 earnings on the 1099-Q form.

 

I thought that since all that money was spent for college, the earnings would not be taxable.  What am I missing?