Holy shit! Yeah dude, that's some serious rust. Never would have guessed either. This is one of the reasons I'm going to stick with what I have, which needs a good bit of work, versus getting another car, and risk discovering something like that.
BTW, there's a fairly thick reinforcement piece in that area, that goes from where your rust is along the roof, and wraps down around the window opening. You can see it sandwiched in the seam there - the one the quarter window bolts to - if you look closely. Make sure the shop repairs that correctly, and doesn't just slap some sheet metal over it.
I'm also just now noticing that you have no rain gutters. I'm guessing someone didn't do that correctly, and that's why you have rust there. Might want to strip the paint all along that section and see what the metal work they did looks like.