The brain is the physical substrate of our cognition and the most complex structure known to humankind. Attempts to study its complex architecture, mainly the connectome, are made through deconstruction and simplification – a brain is segmented neuron by neuron and, through annotation of their connections, reduced to circuits and networks. While valuable, these standard methods for analysing complete brain microstructure are unfortunately severely unscalable. We cannot use a single connectome to study the influence of its structure on the diversity of individual behaviours. In this study, we employ an alternative way of encoding and analysing brain structure using the analytical power of topological data analysis and the non-destructive nature of X-ray nano- and micro-computed tomography. We uncover a massive variation in the complete multiscale structure of brains across hundreds of Drosophila individuals. We use the topological encoding of their brains and link them to the individual behaviours they gave rise to. We then show that the physical structural complexity of the entire brain is needed for the emergence of complex, cognitive behaviour. We thus demonstrate that cognition cannot be fully understood by studying neural networks in isolation from the complete brain architecture, including the local circuits, global networks, macroscale morphology and their non-linear interdependence.