A couple of things. It acts like a glue and helps "seal" everything in. It also helps produce that golden shiny crust that we love. We use an egg + milk combo in our egg wash to give the puff pastry that deep golden color.