Tuberculosis (TB) remains a global public health threat with increasing prevalence. Understanding the dynamics of host-pathogen interactions within TB granulomas will assist in identifying what leads to successful elimination of infection. In vitro TB models provide a controllable environment to study these granuloma dynamics. Previously we developed a biomimetic 3D spheroid granuloma model that controls bacteria better than a traditional monolayer culture counterpart. We used agent-based simulations to predict the mechanistic reason for this difference. Our calibrated simulations were able to predict heterogeneous bacterial dynamics that are consistent with experimental data. In one group of simulations, spheroids are found to have a higher macrophage activation than their traditional counterparts, leading to better bacterial control. This higher macrophage activation in the spheroids was not due to higher T cell activation, rather fewer activated T cells were able to activate more macrophages due to the proximity of these cells within the spheroid. In a second group of simulations, spheroids again have more macrophage activation but also more T cell activation, specifically CD8+ T cells. This higher level of CD8+ T cell activation is predicted to be due to the proximity of these cells to the cells that activate them. Multiple mechanisms of control were predicted. Virtual knockouts show one group has a CD4+ T cell dominant response, while the other has a mixed/CD8+ T cell dominant response. Lastly, we demonstrated that the initial structure and movement rules work synergistically to reduce bacterial load. These findings provide valuable insights into how the structural complexity of in vitro models impacts immune responses. Moreover, our study has implications for engineering more physiologically relevant in vitro models and advancing our understanding of TB pathogenesis and potential therapeutic interventions.