The top of that spark plug pocket is sealed by the coil, BUT.....the water is getting in through the drain hole on the right side of the head. There is a small hole to drain the spark plug pocket on the right side of the head between the two head bolts. You probably got some water in there from washing the bike, or riding in the rain or whatever and it stayed in there and rusted the plug.
And now that I have looked at it closer, I think it might not be a bad idea to tap that hole and plug it with a screw and gasket to keep the water out. You could always remove it to drain any water or blow out dirt. Yamaha puts that drain hole there so you can blow out the spark plug pocket BEFORE you remove the spark plug. This keeps any dirt or whatever from falling into the cylinder when you take the spark plug out.