In a PDF file, you might want to only want to restrict the filling of forms, copying of text/images.
When flattening everything, images, text, checkboxes, buttons, etc all get flattened (meaning: turning them into elements you can’t interact with).
That makes a PDF non-interactive for anyone that sees it — except for viewing.