Context.Results from helioseismology indicate that the radial gradient of the rotation rate in the near-surface shear layer (NSSL) of the Sun is independent of latitude and radius. Theoretical models using the mean-field approach have been successful in explaining this property of the NSSL, while global direct or large-eddy magnetoconvection models have so far been unable to reproduce this.Aims.We investigate the reason for this discrepancy by measuring the mean flows, Reynolds stress, and turbulent transport coefficients under conditions mimicking those in the solar NSSL.Methods.Simulations with as few ingredients as possible to generate mean flows were studied. These ingredients are inhomogeneity due to boundaries, anisotropic turbulence, and rotation. The parameters of the simulations were chosen such that they matched the weakly rotationally constrained NSSL. The simulations probe locally Cartesian patches of the star at a given depth and latitude. The depth of the patch was varied by changing the rotation rate such that the resulting Coriolis numbers covered the same range as in the NSSL. We measured the turbulent transport coefficient relevant for the nondiffusive (Λ-effect) and diffusive (turbulent viscosity) parts of the Reynolds stress and compared them with predictions of current mean-field theories.Results.A negative radial gradient of the mean flow is generated only at the equator where meridional flows are absent. At other latitudes, the meridional flow is comparable to the mean flow corresponding to differential rotation. We also find that the meridional components of the Reynolds stress cannot be ignored. Additionally, we find that the turbulent viscosity is quenched by rotation by about 50% from the surface to the bottom of the NSSL.Conclusions.Our local simulations do not validate the explanation for the generation of the NSSL from mean-field theory where meridional flows and stresses are neglected. However, the rotational dependence of the turbulent viscosity in our simulations agrees well with theoretical predictions. Moreover, our results agree qualitatively with global convection simulations in that an NSSL can only be obtained near the equator.