what is the function of hcl secreted in the stomach
Gastric acid The highly acidic environment in the stomach lumen causes proteins from food to lose their characteristic folded structure (or denature). This exposes the protein's peptide bonds. The gastric chief cells of the stomach secrete enzymes for protein breakdown (inactive pepsinogen, and in infancy rennin). Hydrochloric acid activates pepsinogen into the enzyme pepsin, which then helps digestion by breaking the bonds linking amino acids, a process known as proteolysis. In addition, many microorganisms have their growth inhibited by such an acidic environment, which is helpful to prevent infection.
Biliary tract Bile is secreted by the liver into small ducts that join to form the common hepatic duct. Between meals, secreted bile is stored in the gall bladder, where 80%-90% of the water and electrolytes can be absorbed, leaving the bile acids and cholesterol. During a meal, the smooth muscles in the gallbladder wall contract, leading to the bile being secreted into the duodenum to rid the body of waste stored in the bile as well as aid in the absorption of dietary fats and oils by solubilizing them using bile acids.