Why is it unethical to share the contents of an exam with students who haven't taken it yet?
Why do you think that cheating, or more generally any breach of academic integrity, has to be of direct and immediate detriment to each involved person? The basic idea, to my understanding, of academic integrity is that by violating it, the system as a whole suffers, which is clearly not the same as there are direct negative consequences for each involved individual.

In your example, cheating on a test* can easily be very positive for the individual that is cheating (assuming (s)he is not caught, and also ignoring that (s)he probably did not learn what (s)he was supposed to learn, which may lead to trouble down the road). Of course, for the academic system in total, cheating students are pretty bad, as they severely undermine the value of examinations. 

Similar arguments can also be made for other cases of academic honesty - as a young researcher, it may be quite positive for me to build a great career on manipulated data and forged experiments, but for science as a whole this would clearly be terrible.

This of course leads to the question what incentives rational individuals have to not act against academic honesty. Those fall into two basic categories: fear of repercussion and ethics. Both categories are easy to understand. Clearly, it may work out great for me to cheat on tests and forge my data, but it may also easily be discovered and backfire on me - and if it happens, the consequences are typically dire enough that overall it is not worth the risk for most. Further, as academics we are nurtured in the thought that academic honesty is the foundation of science. Hence, many (most?) academics would not want to violate academic honesty for personal advantage even if they knew for sure that they would not get caught. It is simply our understanding that the entire system is based on academic honesty. 



*By the way, your scenario would not ubiquitously be considered cheating. For instance, in my old alma mater in central Europe, sharing test questions with the next year of students is completely normal and a widely accepted practice among faculty and students. Goes to show that what is considered ethical also differs among regions and institutions.