Every repository has a BAM server associated with it. It may be itself or usually it is another repository. Your BAM server always has all the data needed for all revisions in your local repository if those csets have ever gone somewhere else. Local changes are stored locally and only get sent to the BAM server when they get pushed.
If you pull in new csets from another repository that uses a different BAM server then the BAM data required by those new csets that are not already stored in the local BAM server will be sent along with the new csets and stored locally.
When csets go out from a repository, either from the client pushing or someone cloning or pulling from a bkd talking to this repository, any BAM data associated with the csets in transit are pushed to that repositories BAM server. And also are sent to the remote repository if it doesn’t share the same BAM server, but we check first so data that already exists is not sent again.
The idea is that if you use bk to move csets around then BAM data will get migrated as well. So you can have a master repository at two different sites that each have the BAM server set to “.”. Anyone who clones one of those masters will use that master as a parent and as a BAM server. But if you push csets between sites the data will migrate.