It is done so that avast can route the emails through its localhost proxy for scanning. Avast handles the secure connection for sending/receipt of your emails as required.