Cooking the salmon in foil will keep it soft and moist and it will cook evenly without the risk of drying out. It helps to lock in the natural flavors of the fish for a tastier bite, and it's harder to overcook it using this method.