Underlayment is primarily used to separate the roof covering from the roof deck, shed water and provide weather protection.