Origins of cell compartmentalization