When you compress or stretch a material, the work done is partly converted into elastic energy, which causes the body to return (approximately) to it's initial length, once you remove the load. On the other hand, some of the energy is dissipated into heat. This is the primary cause for hysteresis.
(Tyre-)rubber, due to it's visco-elastic properties is strongly affected by hysteresis, shown by the following stress-strain-diagram (force-extension-diagram, to be precise)
Fig 1 Source: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Elastic_Hysteresis.svg/930px-Elastic_Hysteresis.svg.png
This means if you apply a load to rubber and release it afterwards, you will measure a different force for the same deformation during load and release.
If you now consider a tyre on a flat surface, the contact surface between the two materials forms a plane, meaning that in the front of the contact surface (in the direction in which the tyre is rolling) the rubber is in a loading phase (blue curve). In the back of the contact surface the rubber is unloading (red curve). This results in a non-symmetrical stress-distribution, as shown in the following figure. (Albeit for both of the bodies being cylinders, but the principle is the same)
Fig 1 Source: https://upload.wikimedia.org/wikipedia/commons/8/8c/Pressure_distribution_for_viscoelastic_rolling_cylinders.png
This results in a counterclockwise moment, with respect to the axis of rotation (clockwise), in other word: a retarding moment, or rolling resistance.