ABSTRACT Motivated by observational results, we use IllustrisTNG hydrodynamical numerical simulations to study the alignment of the central galaxies in groups with the surrounding structures. This approach allows us to analyse galaxy and group properties not available in observations. To perform this analysis, we use a modified version of the two-point cross-correlation function and a measure of the angle between the semimajor axes of the central galaxies and the larger structures. Overall, our results reproduce observational ones, as we find large-scale anisotropy, which is dominated by the red central galaxies. In addition, the latter is noticeably more aligned with their group than the blue ones. In contrast to the observations, we find a strong dependence of the anisotropy on the central galaxy with mass, probably associated with the inability of observational methods to determine them. This result allows us to link the alignment to the process of halo assembly and the well-known dependence of halo anisotropy on mass. When we include the dark matter distribution in our analysis, we conclude that the galaxy alignment found in simulations (and observations) can be explained by a combination of physical processes at different scales: the central galaxy aligns with the dark matter halo it inhabits, and this, in turn, aligns with the surrounding structures at large scales.