To me it looks like the first Retrieve action is retrieving the ScheduledCourse object which the input parameter of the microflow (Registration object) is associated to. Retrieve by Association first checks to see if the associated object is in memory already, and if not, it retrieves it from the database.
Then, it is retrieving all Registration objects which are associated to that ScheduledCourse object.
Then it counts the Registration objects to see how many total Registrations there are
Then it updates the ScheduledCourse object with this count, and commits it and refreshes in the client.
Does that make sense?
The reason of retrieving it by association is the following:
By association is the preferred way, unless you need explicitly the database value or constraint is not an association or more complex. Because retrieve by association is a in memory retrieve if the data is available. If not it will result in a database retrieve. A in memory retrieve is quicker and thus the preferred way.
In this particulair scenario, this microflow runs after commit of the Registration object. Save to say that database & memory are equal on moment of execution. So there is no offset between a retrieve by association and from database. By association is in that case quicker.