The milky substance that appears from pruning wounds when you tidy a fig tree is its sap or latex.
If a tree loses too much sap it will be weakened, which is why we prune most deciduous (leaf-losing) trees in the late fall when they are dormant and their sap has withdrawn from the branches and back down the trunk.