How do tree or shrub roots get into water or sewer lines?

Roots require moisture and oxygen to grow. They will follow where they detect moisture, which can be more pronounced around underground pipes. This can happen because of possibly poorly constructed or aged joints that are leaking, or the type of material that is used may be porous and susceptible to letting water vapor escape, such as certain types of clay or concrete pipe. The roots will find these sources of moisture and penetrate into the smallest of cracks, pores, or openings, thus giving way to roots growing in and eventually clogging the pipe.