The main purpose of a portfolio is to have students keep collected works of writing or art over time, so that they can demonstrate improvement and receive long term feedback. Especially with writing, it is a process, and portfoilios reinforce that idea, that we don't or shouldn't merely write for completion of an assignment, but that we should continually revise and rewrite in order to communicate more effectively.
So students first evaluate which pieces of work they choose to include in the portfoilo, i.e. their best works. But it is not just a trophy case, as they still must attempt to make their best works even better. Teachers evaluate what is included in the portfolio on content, but also on progress over time, meeting deadlines, and incorporating the suggestions and feedback into the final drafts of the works included.