So people say you should change cables because of stretch. But after the cables have stretched, isn't it just easier and cheaper to adjust the cable and pull it a bit tighter? Why do I need to replace the entire cable?
Cable stretch is mostly just things settling into place (ferrules into housing, housing into frame stops, housing compressing) rather than physical stretching of the cables, and after a week or so of installing new cables, you simply adjust them to the right tension. This is normal, as is periodic adjustments of cable tensions involved on your bicycle.
Replacing cables is done for a different reason than "cable stretch". A Bowden cable (see also here), such as the shift and brake cables used on a bicycle consists of an inner wire and housing. As the housing's lubrication wears away(*) or the cable rusts, the cable catches on the housing causing things like the brakes not releasing properly or sloppy shifting. Also, sometimes the cables (which are made of twisted wires) fray and break. If this happens on your brake cable, you don't have braking (which is bad!). Most shift cables fail safely by just forcing you to some extreme gear combination (rear is normally the smallest sprocket). Thus, it is advisable to replace your shift and brake cables periodically.
I have to replace my cables at least once every winter due to corrosion and road crud, for example, but I do have to do cable tension adjustments periodically when the cables are not replaced (such as indexing getting a bit sloppy or to account for my brake pads wearing down or something).
(*) Some people oil their cables. Most manufacturers now recommend against this.
Another reason why I change my cables (every couple of years) is that the ends of the outer casing tend to get crimped and break down. Then you need to tighten up everything and eventually will not be able to take up all slack to create the tension that you need. Also most housings have an SPF rating just like sunblock, although it takes a long time exposure to sun light does take its toll on the cables.