At my university publishing old exams is considered a good practice.
Some advantages:
- Students know what to expect during real test.
- Students can test their knowledge and check which topics they need to relearn.
- There is an additional problem supply for practice.
- Sometimes professors lose their old tests (e.g. disk failure, etc.), and publishing them might serve as additional backup.
- You get access to exams constructed by your predecessors and your successors will get an easy access to yours.
- As pointed out in the comments by @AndrewStacyAndrew Stacey, it makes sure that everyone has access to tests and so "levels the playing field".
Some disadvantages:
- Creating a new exam requires more work.
- It might be hard to assess the difficulty of a new problem.
- New exams are harder to grade objectively.
- Students know that some areas might be more probable (e.g. theorem XYZ won't be used, because it was given last year) than others.
I hope this helps $\ddot\smile$