CBSA and CBP exchange data, because in some cases like land crossings, only entries are recorded, not exits! Which means, when you leave Canada by land to USA, CBSA does not record the exit, but CBP records it as an entry. If you return by land, the roles get reversed...