Your wood roof deck is installed on top of the basic frame to give a surface area on which to install Shingles. Without a roof deck installed on your house, there would be nowhere to install your Shingles. And of course without the shingles, your roof deck would rot away due to exposure to the sun, rain, snow and ice.
On newer houses, sheets of plywood or OSB boards are fastened on top of wooden trusses in your attic to form the roof deck. Plywood and OSB boards are installed in a staggered formation with small spaces between them to allow wood to expand and contract as the wood heats in the summer and cools in the winter. Older homes often have lengths of 2″ x 6″ installed instead of plywood or OSB board. When the time comes for you to replace your roof system, your roofing contractor can replace any and all damaged wood.
Remember, if your roof deck is rotting or damaged in any way people walking on your roof could potentially crack or break through the wood, causing further damage to the roof system, such as to the shingles, and to the person who walked on it! However, most roof decks can withstand a little bit of exposure to water or ice before they need to be replaced.