The reason behind the lipids which are able to function as protective barriers in cells is that lipids do not dissolve in water.
If lipids dissolve in water, they will not be able to function as protective barriers in cells. Nucleic acids, proteins, lipids and carbohydrates are the four types of macro-molecules in the cell.