The most important function of hydrochloric acid in the stomach is:
Destruction of bacteria
Neutralization of chyme
Activation of pepsinogen
Stimulation of pancreatic secretion
Functions of HCl are: 

activation of pepsinogen to pepsin by providing acidic medium,
bacteriolytic action and
acidification of chyme which cause release of secretin and cholecystokinin hormones.