When don’t you need to assign Office 365 licences to mailboxes? When they’re non-user mailboxes of course. But when DO you need to assign licences to these non-user mailboxes?
If a resource, room, or shared mailbox goes over its quota of 10GB then it needs a licence, and if one isn’t assigned after one month, the mailbox will be locked.
The recommendation is to use archiving to avoid going over the quota: http://bit.ly/1qBZPrh.