We are poised to use computing to transform our knowledge of galaxy formation. As telescopes captured ever more information, astronomers have measured the results of chaotic processes shaping galaxies over time. As supercomputers accelerated, theorists have built models reproducing realistic galaxies. However, neither approach tells the full story. Therefore, to learn how galaxies formed, it is important to analyze jointly the best data and the best simulations. I will describe how I advanced this approach to exploit ambitious calculations of the cosmological formation of galaxy populations. By predicting how dark matter and gas interact with the uncertain physics of stars, black holes, and interstellar matter, such simulations can take full advantage of astronomical observations. Recently, I showed that because they assembled so rapidly, distant galaxy mergers are more common than the simplest arguments would imply. Further, I improved image-based merger diagnostics by training many-dimensional machine learning classifiers with simulations. By applying these results to data, I measured a galaxy merger rate in the early universe in broad agreement with theory, an important test of our cosmological understanding. Many questions remain, such as the true origins and nature of galactic winds, the gas and metal cycle, and the role of black holes. To disentangle these subtle and diverse processes, I aim to combine astronomical surveys with large, detailed, and widely accessible predictions, enabling us to learn how and why galaxies formed.