There are several reasons that the university wants you to do this.
The most serious is as a safeguard against possible problems that might arise if your relationship with your (actual) advisor deteriorates. For example, if your advisor asks you to do something that you think is unethical, or is making what you think are unreasonable demands on you, the idea is that you should be able to go to this second advisor to talk about these things. Whether or not this is actually realistic is another question.
This has nothing to do with authorship of publications, unless the second advisor is actually an author.