Strictly speaking, the = should be ≡, because what is being described here is an equivalency relation (a and r both have the same remainder on division by b). Since equivalency relations are by definition symmetric, a≡b and b≡a are ... um ... equivalent ... statements.
For an integer b there are b equivalency classes - one for each modulus - which between them partition the integers. For example, modulo 5, the integers are partitioned into {... -10, -5, 0, 5, 10, ...}, {... -11, -6, -1, 4, 9, ...}, {... -12, -7, -2, 3, 8, ...}, {... -13, -8, -3, 2, 7, ...}, and {... -14, -9, -4, 1, 6, ...}.
The number returned by the modulus operator is merely the "canonical" member of the corresponding class - specifically, the smallest nonnegative one (in the above, they're 0, 4, 3, 2, and 1).
Wheee... a smile, two bangs and modular arithmetic. Next Week: Group Theory or Hausdorff Manifolds.