Why do lipids in a cell hydrolyze into glycerol and fatty acids?
Organisms control rates of chemical reactions in two ways. First, by controlling the conditions, and second, by controlling the location of reagents.

Conditions

Hydrolysis of esters is very slow at normal physiological conditions: 37 oC and pH 7.4. A mixture of water and simple esters like ethyl acetate remains stable for years. At higher or lower pH, the reaction becomes faster. As you mention, the HCl in the stomach would definitely increase the rate of hydrolysis. The reaction is also accelerated by enzymes, and organisms use enzymes for all intentional ester hydrolysis. 

Location

For a reaction to occur, the water molecule and the acid catalyst needs to get to the ester. In cell membranes, that ester functional group is not on the surface of the membrance; the ionic phosphate part is. The ester group is just below the surface, in the hydrophobic interior of the membrane. Neither water, nor acid can penetrate into this hydrophobic region. 

In the stomach, there is an extra layer of protection: mucus, which prevents the stomach acid from reaching the cells.