Why do I receive messages after I enable Do Not Disturb?

The Do Not Disturb function takes effect only after you enable it, set a time range, and select a device.