Clearly, there is more art than rigorous science to legal reasoning. Yet, the art can be learned and, within limits, rules for its practice can be described. Good lawyers are good at legal reasoning. This means that they can find the rule of a case that is 'better' than its alternatives for a given new application. It does not mean that they can explain how they do this.
Law students acquire the skill of legal reasoning by reading hundreds of cases.
They get better and better at finding the stronger or more defensible holdings for a given case insofar as these are to be a function of the applicable precedents. But they may not get any better at explaining how this is to be done. What they are learning is to recognize complex and important similarities in cases, that is, to recognize critical ways in which they are analogous. This is much like the commonplace but extremely subtle process by which we all learn to recognize family resemblance in faces, rejecting irrelevant similarities and fastening only on those most indicative of kinship. As a logical problem, this recognition boggles the mind and should lead us to astonishment that it is so often done reliably.