I don't have a great grasp on GROUP BY thing, so please bear with me and let me know if I totally misunderstood- I think both what you posted (and what this exercise accepts) is incorrect.
I don't believe that including dep_date actually returns average by day and month. However I believe that including id instead does. If you run your code, look for the result of Monday in 2003-10. You will see it is 4301. If you run the same code if id instead, it returns 2150.5.
Now, if you run a query to return all the Mondays in 2003-10, you get two rows: id 12038 & 3711. The distances of these two flights are 590 and 3711- the SUM of which is 4301, and the average of which is 2150.5. I believe this is because by including dep_date, it is not taking into account flights that occurred on the same date, and because it is grouping by the date, it ends up adding it and not returning the sub-query as distinct lines. Including and grouping by id instead of dep_date when creating the alias table, it takes flights which occurred on the same date into account. There are 499 entries and only 441 distinct departure dates, so this is presumably affecting other entries as well.
Please let me know if this makes sense or if I've completely misunderstood. Thank you!