Why HCl don't harm our stomach?
Our stomach releases Hcl, pepsin and mucus for digesting food.
Hcl creates a medium for pepsin to act on proteins and mucus forms a thin layer on the inner lining of stomach to protect it from Hcl.
Although, mucus protects us from Hcl but, Sometimes a large amount of Hcl is released which causes acidity.