We examine sources of scatter in scaling relations between galaxy cluster mass and thermal Sunyaev–Zel’dovich (SZ) effect using cluster samples extracted from cosmological hydrodynamical simulations. Overall, the scatter of the mass–SZ scaling relation is well correlated with the scatter in the mass–halo concentration relation with more concentrated haloes having stronger integrated SZ signals at fixed mass. Additional sources of intrinsic scatter are projection effects from correlated structures, which cause the distribution of scatter to deviate from lognormality and skew it towards higher inferred masses, and the dynamical state of clusters. We study the evolution of merging clusters based on simulations of 39 clusters and their cosmological environment with high time resolution. This sample enables us to study for the first time the detailed evolution of merging clusters around the scaling relation for a cosmologically representative distribution of merger parameters. Major mergers cause an asymmetric scatter such that the inferred mass of merging systems is biased low. We find mergers to be the dominant source of bias towards low inferred masses: over 50 per cent of outliers on this side of the scaling relation underwent a major merger within the last Gyr. As the fraction of dynamically disturbed clusters increases with redshift, our analysis indicates that mergers cause a redshift-dependent bias in scaling relations. Furthermore, we find the SZ morphology of massive clusters to be well correlated with the clusters’ dynamical state, suggesting that morphology may be used to constrain merger fractions and identify merger-induced outliers of the scaling relation.