Repointing masonry is a regular maintenance item that is generally necessary every few decades or so. So what is the purpose of this exercise, anyway?
What Repointing Does
Repointing is the repairing of surface deterioration to mortar. Mortar does decay over time. In extreme cases, it simply crumbles away as the lime and/or cement washes away. More commonly, it tends to break away from the stones, leaving cracks in the structure.
The Degrees of Mortar Deterioration
Cracks in the joints of masonry causes two problems. First, it loosens the individual stones, making the structure more vulnerable to damage. In extreme cases, settlement and severe cracking damage will result as the stones fall out of the wall. Secondly, severe cracking can cause water penetration, leading to more extensive damage later on.

Even if the structure is not cracked, the mortar can decay over time. If left untouched, the mortar will eventually entirely leach out of the structure. This, in turn, will loosen up the stones, resulting in weakening and possible crumbling of the wall. How severe the damage will be depends on how reliant the structure is on the mortar.

A less extreme form of mortar deterioration that is common is where the surface mortar has decayed. Perhaps some of the surface mortar has fallen out, perhaps not, but in either case on close examination it will be found that the mortar is very soft and crumbly, providing no structural integrity, though further back in the wall the mortar may be sound.

All of the cases described above are repaired by repointing
The Principles of Repointing
Repointing is done by cutting out the damaged section of mortar deep enough to achieve a good bond and the reach solid material behind the questionable mortar. The old mortar is cleared away with a chisel until solid mortar below is found. Cracked mortar is also cleared away in the same fashion at least deep enough to ensure the new mortar on top can thoroughly bond and seal the joint.
There are two basic rules of thumb to follow. First, never cut off a piece of stone if at all possible, and, second, as much as practical, leave the sound mortar alone; the sound mortar will always bond better than any repointing ever can.