Recent observations from integral field spectroscopy (IFS) indicate that the fraction of galaxies that are slow rotators (SRs), FSR, depends primarily on stellar mass, with no significant dependence on environment.We investigate these trends and the formation paths of SRs using the EAGLE and HYDRANGEA hydrodynamical simulations. EAGLE consists of several cosmological boxes of volumes up to (100 Mpc)3, while HYDRANGEA consists of 24 cosmological simulations of galaxy clusters and their environment. Together they provide a statistically significant sample in the stellar mass range 109.5-1012.3M⊙, of 16 358 galaxies. We construct IFS-like cubes and measure stellar spin parameters, λR, and ellipticities, allowing us to classify galaxies into slow/fast rotators as in observations. The simulations display a primary dependence of FSR on stellar mass, with a weak dependence on environment. At fixed stellar mass, satellite galaxies are more likely to be SRs than centrals. FSR shows a dependence on halo mass at fixed stellar mass for central galaxies, while no such trend is seen for satellites. We find that ≈70 per cent of SRs at z = 0 have experienced at least one merger with mass ratio ≥0.1, with dry mergers being at least twice more common than wet mergers. Individual dry mergers tend to decrease λR, while wet mergers mostly increase it. However, 30 per cent of SRs at z = 0 have not experienced mergers, and those inhabit haloes with median spins twice smaller than the haloes hosting the rest of the SRs. Thus, although the formation paths of SRs can be varied, dry mergers and/or haloes with small spins dominate.