In Office 365 updates are applied periodically. If updates are to take place, all the open Applications have to be closed. So In case a User is working on an application, he/she needs to be notified before updates occur.
Normally a User is given a notification every 2 hours starting from 12 hours before the deadline. And once the deadline is reached, the User is given a 15 minute warning before Office is restarted. This is done so that the User can save their work before the Application closes.
In order to apply or set a deadline, one can either use Group Policy or the Configuration file from the Office Deployment Tool. If a Deadline is applied to both of them, then the Group Policy takes precedence.