Not true. Separating into layers does not create a smaller file. I think you are confusing OCR performed on a scanned image that is used to create an editable text layer - but this does not white out the areas of text!
Most likely the scan was taken into PhotoShop and manipulated into separate layers and saved as PDF (not a JPG) - thus preserving the layer manipulation.
True, separating into layers does not in and of itself create smaller files. Acrobat separates documents into layers to allow different types of compression optimized for different types of data. That is what made Adobe Acrobat such a great program in the first place.