Wood rot is always the result of exposure to moisture, as you know. In a 25-year old boat, there have been many opportunities for moisture to get in. Too many to guess. It's hard to imagine a boat that old never having had water in the bilges, and once there it will make its way into any wood it can find.
But even if your boat had never been in the water, you could get moisture in the wood through condensation. Any boat that is stored in unheated space will naturally accumulate moisture from the atmosphere. Driz-Air is the product that absorbs atmospheric moisture. It really works, and no boat should be stored cold without it.
The big question is what else is rotted. If the engine room bulkhead is affected, there could be problems in other areas. I'd recommend having a professional survey done.