A cell needs a selectively permeable membrane in order to maintain a balance of water in the cell and the ability to bring in glucose and other items it needs for both DNA and RNA processing along with waste removal.
At the same time, materials that may be harmful to the cell must be kept out of the cell, and its ability to differentiate between those that are necessary and those that are not needed keeps the cell healthy.
One of the ways we kill bacteria is through the understanding of the permeability of the membrane. Using salt water and gargling when you have a sore throat causes the water in a bacteria cell to leave the cell, thus lowering the concentration of salt in the surrounding solution, which makes it isotonic with the cell. In doing so, the water in the cell leaves the cell, and the cell dies as it cannot carry on its normal activities.
A cell can also be destroyed by having its surroundings too low in salt. Then the cell will take in more water to reduce the salt content. In doing this, it enlarges and can burst.
As you can see, the ability to control the amount and kind of substances through the cell membrane is very important.