Apple’s silicon chips are very efficient because they are highly integrated, i.e. they combine many components that were previously distributed individually on the logic board.
As a result, fewer components remain, they take up less space and the logic board can be smaller. Since Apple has left the design of the Mac mini unchanged, the big fan has enough space and the rest of the case is more or less empty.
It is also interesting to see that the Mac mini (at least its inner workings) has shrunk so much that it can almost compete with the compact dimensions of an iPhone.