Running code from a not compiled WASM? (I'm confused.)

I run code from https://github.com/vporton/test-nonexistent-canister:

$ dfx start --clean
(switch to another terminal)
$ make

(the string BBBBBBB is output in another terminal)
$ find -name *.wasm
./.dfx/local/canisters/A/A.wasm

So, only A is compiled, B isn’t. Now I wonder why BBBBBBB from not compiled B was output?!

Below is the code for your reference:

dfx.json:

{
  "canisters": {
    "A": {
      "main": "src/A.mo",
      "type": "motoko"
    }
  }
}

Makefile:

.PHONY: run
run:
	dfx deploy A
	dfx ledger fabricate-cycles --amount 1000000000 --canister A
	dfx canister call A init '()'

A.mo:

import Cycles "mo:base/ExperimentalCycles";
import B "./B";

actor class A() {
    public shared func init(): async () {
        Cycles.add(1000_000_000_000);
        ignore await B.B();
    }
}

B.mo:

import Debug "mo:base/Debug";

actor class B() {
    Debug.print("BBBBBBB");
}

A imports actor class B and instantiates it, which leads to the Debug.print in B being executed

Although dfx doesn’t compile B explicitly, the compilation of A requires the compilation of dependency B. The wasm binary for B is actually included directly in the wasm binary for A, so that A can deploy the code for B programmatically, whenever a new instance of class B Is created.