Dry rot affects wood that contains moisture. There are a number of common reasons that wood can become damp. In household settings, some of the more common reasons are leaks sourcing from the shower, washing machines, bath tubs, and so on. In some cases, the moisture can come as a result of outside water from rain making its way into your home.
Any wood that has become dry rot should be replaced, preferably with pre-treated wood so help prevent dry rot from forming again in the near future.