It is always preferable to remove the exhaust air exiting the vacuum unit to the outside of the building. This dampens the exhaust air noise further and removes the stuffy warm air completely from the building.
Examples where this would be necessary are if the vacuum is located in a closed cupboard, where it may overheat without being exhausted externally or under the stairs closer to living areas.
The flap opens when the vacuum is switched on and closes under gravity when turned off and is there to stop the elements or vermin getting into the pipe work.
NB: exhaust pipe runs to the outside of the building ideally shouldn't be longer than 3m. Any voids within the building can also be exhausted into ie a floor or roof void.