The kind of pipework matters. Foul sewers will not be affected by roots for two reasons. The first is that these pipes are generally well sealed and even if there is a crack, the roots of trees will generally be killed by sewer gases.
Land drains and percolation drains from a septic tank can be invaded by tree roots and can be blocked. These drains often have slots to allow water in or out in the latter case, and tree roots can get in and eventually fill the drain.
To prevent this, drains are sometimes wrapped in a special woven memberane that blocks tree roots but this needs to be put in with the drain, and it tends to need some upkeep in future years, as occasional breaches still occur.