Fallback function in Solidity is provided only 2300 gas to get executed successfully. As a result, inside a Fallback function, the operations like sending ether, deploying contracts which consume more gas than 230002300 gas cannot be performed.
In contract A, fallback function accesses block number and saves it only. So it works well. But in case of contract B, the fallback function sends ether to contract A which exceeds the gas amount available for fallback. As a result, it gets reverted.
For further explanation, take a look here: FallbackFunction in Solidity