Assetbundle's assets included into build

How Unity knows which assets to include into a build if they are going to be requested on run-time? Where is the magic? The examples I have seen, show how to create asset bundles from the project, and how to load assets from those bundles. But I don’t see how Unity is told not to include those assets.

Thanks in advance.

This is my understanding:

Assets in the Project hierarchy are by default, NOT included in the build unless:

  1. They are referred to (through the chain of dependencies) by a level.
  2. They are within “Resources” Folder, to be loaded dynamically.

So requesting assets at runtime will fail unless one of those two conditions above is true.