The concentration--virial mass (c-M) relation is a fundamental scaling relation within the standard cold dark matter (Lambda CDM) framework well established in numerical simulations. However, observational constraints of this relation are hampered by the difficulty of characterising the properties of dark matter haloes. Recent comparisons between simulations and observations have suggested a systematic difference of the c-M relation, with higher concentrations in the latter. In this work, we undertake detailed comparisons between simulated galaxies and observations of a sample of strong-lensing galaxies. We explore several factors of the comparison with strong gravitational lensing constraints, including the choice of the generic dark matter density profile, the effect of radial resolution, the reconstruction limits of observed versus simulated mass profiles, and the role of the initial mass function in the derivation of the dark matter parameters. Furthermore, we show the dependence of the c-M relation on reconstruction and model errors through a detailed comparison of real and simulated gravitational lensing systems. An effective reconciliation of simulated and observed c-M relations can be achieved if one considers less strict assumptions on the dark matter profile, for example, by changing the slope of a generic NFW profile or focusing on rather extreme combinations of stellar-to-dark matter distributions. A minor effect is inherent to the applied method: fits to the NFW profile on a less well-constrained inner mass profile yield slightly higher concentrations and lower virial masses.