Note that the documentation for the Comparator interface doesn't state that the compare() method MUST be consistent with equals() but this IS recommended and the documentation warns to be careful if these methods are not consistent.
In our case, when we use the Comparator rather than the natural ordering defined by Comparable, we don't observe the "strange" behaviour alluded to in the documentation for Comparator because the course numbers happen to be unique for the keys (not the values) in the recommender. Admittedly, we got lucky here. We will run into problems if we try to add two courses from different departments with the same course number as keys to the recommender - try it! The second course will not be added as a key because there's already a key in the map with the same course number.
This is a great observation but goes beyond what I'd expect you to deal with in this course.
Paul