I bought my pathfinder and just like you didn't notice this until it was mine

I had the EXACT same problem & same place, the strut tower housing had rotted and the apron was peeling away and jabbing into the steering.
I didn't notice until I came back from a trip to SC, hit a huge pothole on a highway in NJ going 75 mph (it looked like a touch up of asphalt b/c it was dark). 20 mins later I hear a knocking sound coming from the driver side when I hit small bumps. Well, a strut and ball joint replacement later the truck was still making a noise. Took it to Nissan and they found that rot and showed me that the strut tower on the driver side was jacked up a good 2-3 inches higher than the passenger side, it was visibly obvious! They said the knocking noise was the strut tower pushing the brake master cylinder and power steering reservoir into the hood when I hit bumps. Both were jacked up and looking at the truck from behind, it visibly sagged down on the driver side. The estimate? DEPRESSING! Around $1,500 @ a dealership.
Luckily, my husband's uncle owns a mechanic shop for farm equipment/big trucks. He is very skilled at welding and taught his son (my husband's cousin) how to weld and his son is very good at it. So my cousin in-law did the welding for us for $300. He did a great job and undercoated that whole area for us as well to protect it. It corrected the knocking noise and the structural integrity of the vehicle! Basically, this can be fixed.
I would suggest looking for a place that does welding & getting estimates. Dealerships will rip you off and its inside a wheel well where no one is going to notice if its pretty or not! This repair should run you between $200-$500 depending on where you go and if you want it painted a certain way. If you want, I can get pictures on here for you of what my mended strut tower looks like. Hope I helped!