It is just there for flavor, it has no effect on the flakiness.
Bulk
Pastries are typically made with butter because it makes them quite flaky and they brown well. ALso, since the other ingredients in most types of pastry are just flour and salt (and maybe yeast), butter has a lot to do with the flavour. Margarine based pastry will taste different and may not be quite as flaky. Good quality bakeries probably only use butter, while a lot of commercial products are made with margarine or other fats/oils. Read the lable to find out.
You can make it tasty. Salt is a preservative too.
Recipes will vary depending on the type of pastry or bread your making but the are the basic ingredients, Short crust pastry is Flour, Fat a little salt and water. Bread dough is Flour, Fat, Yeast, a little sugar (to activate the yeast) salt and water.
Shortcrust pastry is classically made without raising agents - just plain flour, butter, salt and water.
Culinary products made out of flour. In the case of bread the other ingredients are yeast and water (with a little salt and oil). In the case of pastry the other ingredients are fat (and a little salt and water).
Salt dough is made from a mixture of flour, salt and water, Food coloring is used to color the material. It is used to make models and small sculptures and can be baked in an oven to obtain solid sculptures.
Sieved flour, milk and water, with a pinch of salt.
For example melting and boiling of salt are physical processes.
Salt in baking has three uses. It helps preserve the food, helps in flavor and aids in doughs rising.
Salt is a chemical compound. It has chemical and physical properties.
Water (or steam). A suet pastry is similar to other pastries except that it uses beef fat or suet. The fat creates layers in the pastry, which can then separate and rise from steam when baked.