Check Matrix Scheme for an overview of the process.
Although the examples below are based on Pivot Matrix or Destination Matrix, meaning, final cost center (Pivot Object) to P&L (Final Destination) , the working method of the Allocation Matrix is the same for all allocations until final cost center (Pivot Object)

The rule works as follows:
The system gets the amount allocated or going to Destination (P&L, Billing, Capex, etc...), ignoring everything (costs going to Process Order, depreciations (Credit (D90) and Debit) and fixed costs absorbed (E90) with exception of fixed costs of the period (Credit + Debit) and dividing Credit by Debit.
This is possible because destination type "STOCK_VC" is calculated by all cost posted on cost centers of node ECP from hierarchy ZCBS.