The "sort by dates" view will show events from courses which have passed and/or future courses, whereas the "sort by courses" view does not. The problem can be replicated using the script from
MDL-58464 - after running it you'll see events from all courses in the sort by dates view, but in the sort by courses view you will not see all the courses.
I'm unsure if this is wrong or not. To me both sets should be identical to the user, they are simply different views of the same data as far as a user is concerned. But it requires discussion.