From my experience, if you have a bike you use all year round, especially in the winter when they cover the roads with salt, then over time the studs simply degrade.
When i last took my exhaust off to replace the gaskets, i was thinking it would be a nice an easy job as i'd sprayed the studs for a couple of weeks beforehand to try and prep them for removal.
The reality was that the stud didn't just break, it was like it was made of soft sugar candy, and it would've made no difference at all what i did to it, it was going to break regardless and it just twisted off around half way of the stud extremely easily.
This was a known problem which is why i believe Yamaha made the studs bigger on later bikes, rather than the useless 6mm ones we have on these.
So it really is the luck of the draw if you can undo the header nuts safely without some sort of complication.