The main function of the lipid bilayer is the selective permeability i.e., a control on what enters or leaves the cell (and other organelle). Thus, the bilayer is a barrier between the cell (or its organelle) and everything else (i.e. the environment). The lipid bilayer is composed of two layers of phospholipid molecules. These molecules are amphiphilic and have hydrophobic tails and hydrophilic heads. The hydrophobic tails point towards each other, while the hydrophilic heads point outwards. These bilayer prevent the entry of molecules in areas where they may be damaging to the cell or its organelle. The bilayers allow only certain molecules, such as water, lipids, etc. to pass through; while blocking the entry of proteins, large polar molecules and ions. Without the bilayers, all types of molecules would be able to diffuse through the cell and its integrity and survival would be at stake.
Hope this helps.