Access to past (or practice) exams is good test design
Any test or experiment will have "noise". That is, beside the thing you want to test, there will always be other factors affecting your results. This is, of course, also true of exams.
As others have explained, there are nuances to any question that the examiner might not even be aware of. Local academic culture, implicit biases and assumptions, the level and scope of a specific course. A student hoping to do well on a test has to take all of these into account. However, these details are usually not what you're testing for. You want to know whether a student understood and memorized the subject matter, not if they remember which notation a specific professor prefers.
The more noise you introduce into an exam, the more effort is required from your students (if they want to do well) to mitigate its efffects. "Secret" tests are especially noisy because the student, by design, cannot know which aspects of the course material will become relevant. This includes things only tangentially related to the subject matter.
Did the professor choose axiom X on purpose or can I also use the more generally applicable Y? They mentioned Y in a lecture, but didn't go into detail. Do they always use this notation or only in special cases?
In my experience, this often leads to last minute "cramming": immersing yourself in the course material and (indiscriminately) memorizing as much as possible shortly before the exam. This allows the student to guess secondary details ("in this kind of question, we used axiom X, but we didn't cover Y so that's probably out of scope") more easily since they're fresh in their mind. However it is usually not a good learning technique. It is something students adopt to cope with the uncertainties that come with the test method*.
You can reduce noise by exposing students to the types of question, the expected scope of the exam and the answer style you expect throughout the course. Letting them practice on old (or mock) exams will allow them to test their knowledge, assimilate the cultural details over time and concentrate on understanding the subject they're actually supposed to study.
What if, after releasing past exams, almost no one fails anymore?
Congratulations, you have made your students more successful by allowing them to prepare better. This is a good thing. If you feel that the exam is too easy now, add more challenging content. You'll produce more competent graduates.
Caveat: This line of reasoning assumes that you prepare a "fresh" exam each time and that it is reasonably well designed to test for understanding of the subject matter in the first place. Reusing previous questions with minimal changes will defeat the purpose.
*Yes, laziness is also a factor.