The Z-Axis pressure sensor is used to automatically level the heatbed using a membrane switch, which makes it possible to detect the nozzle contact with the table. In this case, the nozzle acts as a pressure element, triggers the pressure readed by sensor.
The optical filament sensor detects the presence of a filament and its movement. The MK3 can recognize, that filament is running out, pause the print and ask the user to insert a new spool. It can also detect stuck filament and offer the user an option to clean the nozzle.