You've seen the failures, including several that occurred this time last year ("Cookout Season brings Rash of Deck Failures," 6/13). That "rotting material" is a flashing failure.
In this video, Glenn Mathewson outlines the locations, materials, and methods for getting deck flashing right the first time.