What’s the PT lumber with lag bolts all about? Strange. Here’s another thought on the water stains, kick out flashing extends beyond roof edge, water could be getting under flashing there. Not saying it’s the cause but could be added to the line of suspects. Also there’s no step flashing visible above it. Another possibility.
Was this area caulked? Again if step flashing is there you can’t see it…