1. No, publishing does not auto hide anything in your datasource. It goes as is.
2. Optimize embeds certain calculation results into extract so they can just be used and not recomputed on the fly. Plus it might remove materialized calculations from extract if those are no longer needed or valid.