  Subhalo abundance matching (SHAM) is a widely-used method to connect galaxies
with dark matter structures in numerical simulations. SHAM predictions agree
remarkably well with observations, yet they still lack strong theoretical
support. We examine the performance, implementation, and assumptions of SHAM
using the EAGLE project simulations. We find that $V_{\rm relax}$, the highest
value of the circular velocity attained by a subhalo while it satisfies a
relaxation criterion, is the subhalo property that correlates most strongly
with galaxy stellar mass ($M_{\rm star}$). Using this parameter in SHAM, we
retrieve the real-space clustering of EAGLE to within our statistical
uncertainties on scales greater than $2$ Mpc for galaxies with
$8.77<\log_{10}(M_{\rm star}[M_\odot])<10.77$. Conversely, clustering is
overestimated by $30\%$ on scales below $2$ Mpc for galaxies with
$8.77<\log_{10}(M_{\rm star}[M_\odot])<9.77$ because SHAM slightly overpredicts
the fraction of satellites in massive haloes compared to EAGLE. The agreement
is even better in redshift-space, where the clustering is recovered to within
our statistical uncertainties for all masses and separations. Additionally, we
analyse the dependence of galaxy clustering on properties other than halo mass,
i.e. the assembly bias. We demonstrate assembly bias alters the clustering in
EAGLE by $20\%$ and that $V_{\rm relax}$ captures its effect to within $15\%$.
We trace small differences in the clustering to the failure of SHAM as
typically implemented, i.e. the $M_{\rm star}$ assigned to a subhalo does not
depend on i) its host halo mass, ii) whether it is a central or a satellite. In
EAGLE we find that these assumptions are not completely satisfied.
