Membranes within the cell are used in compartmentalisation for numerous reasons- one being to allow processes to occur separately in different organelles without interacting and affecting other processes, while the other reason is to prevent potentially dangerous substances such as hydrolytic enzymes found in lysosomes from entering the cell contents and causing damage to other organelles and as a result the cell itself.