The tree's functions are to absorb and store water from heavy precipitation. Additionally, roots bind the soil, which prevents water flow.
However, if deforesting occurs there is no natural barrier to prevent heavy rainfall. Therefore it will cause flooding.