You can define an ad unit in your Google Publisher Tag and serve ads to it, even if that ad unit doesn't exist in your Google Ad Manager inventory.
One of my clients came to me with an unusual Google Ad Manager query this week. An ad unit was showing ads on their site but wasn't listed in the Ad Manager interface.
In other words, they had identified the ad unit's unique 'code' using the Google Publisher Console, but no ad unit with this code value was listed under the 'Inventory' section of Ad Manager - not even as 'inactive' or 'archived'.

Google Publisher Console is a useful way to identify an ad unit's unique 'code' value (highlighted in yellow)
It turns out than an ad unit will function (with some caveats) if you add the relevant code directly to your site without creating the unit in Ad Manager's Inventory section. This isn't something you'd do accidentally, because you need to both define the ad unit in your Google Publisher Tag and then display it in the relevant place on your site.
So what are the caveats? There are two major ones that I've discovered:
First, if you haven't created the ad unit in Ad Manager itself, it won't be included in the list of ad units available for targeting. In my client's case, the ghost ad unit was displaying run of network adverts as they weren't able to target this ad unit specifically. Other targeting options, including custom targeting, should still work.
The second caveat relates to reporting. Impressions and clicks on any line items served in the ad unit are still tracked, but in custom reports they appear under the ad unit name 'Default'.
And adding the attribute 'Ad unit code' just causes the report to show your 16-digit publisher ID rather than the code value you specified in the Google Publisher Tag:

Report shows impressions and clicks but not ad unit name or unique code
So it's far from ideal to have ad units on site but not in Ad Manager. How might this situation come about? Well, you could set up GAM by adding the ad unit code to the site first and creating the ad units in Ad Manager (with matching 'code' names) afterwards. I haven't tried this myself, but I'm confident it would work.
But if this process was only half completed, you'd end up with ad units on site but not in Ad Manager - and one very confused client.
