There are three primary reasons for maintaining a space between the outside of your home (including decks):  1) It creates a defensible space in the case of a forest fire,  2) It helps reduce moisture from accumulating on the home and roof.  Moisture leads to increased maintenance and wear/tear on your home,  3)  Reduces the chances and severity  of damage to your home by falling limbs or trees.

The general guidelines are that shrubs should be trimmed back at least 3-5 feet from the home. Within 30 feet of your home trees and their branches should be spaced at least 10 feet from each other and 10 feet away from any chimneys.   The spacing and clearance for trees depends on how high and large they can grow.  To find out more information please see the following links

https://www.arborday.org/trees/rightTreeAndPlace/size.cfm

https://www.fs.usda.gov/Internet/FSE_DOCUMENTS/stelprdb5436046.pdf