What could be function of nuclear membrane? It is porous and seems to allow materials to pass freely.
Simply, to separate the content of the nucleus from the content of the cytoplasm.
We know, the nucleus contains DNA,RNA and proteins.
Genetic material DNA is protected from cytoplasmic enzymes by encasing it inside nucleus.