While both methods could be argued, there are very few advantages to passing shareClassId :
shareClass.Id is a property, so a method call (which can be optimized or cannot be inlined). shareClassId is a prime integer.
Thus, there is very little parameter to pass.
Update
There is another reason why the parameter could be used: It consistant. You used the parameter for the first "search by identifier", so use the parameter again again.
None of these reasons are terribly convincing, but since you asked, I assume that you are interested in any conceivable reasoning.
source share