Milk provides the acid that baking soda and baking powder need in order to create CO2 bubbles... in other words, to create lift to whatever it is that you're baking.
Baking soda reacts immediately with the milk (in the mixing bowl). Baking powder, when heated, performs its reaction (in the oven.)
Eggs also create lift when heated, as well as acting as a binder for the other ingredients.
Sometimes the recipe needs the fat from egg yolks, particularly as an emulsifier, but sometimes it will ruin the mixture, as when making whipped cream or meringue.
These are very brief explanations, but getting a good book on baking will clarify these things and more. If you can't afford one, you might try your local library. Baking is distinctly different from other forms of cooking and worth the effort to understand it!