The answer comes when we realize that the 1 × 1 × 1 blocks must occupy a diagonal of the box. Each of the 9-cube layers, in every direction, contains an odd number of cubes, but each 1 × 2 × 2 block can fill only an even number of positions (2 or 4). So every layer must contain one 1 × 1 × 1 block.
It’s called the Slothouber–Graatsma puzzle, after Dutch architects Jan Slothouber and William Graatsma. Princeton mathematician John Conway invented a more complex puzzle that also yields to an insight regarding parity.