Yep. I hear that term thrown around a lot more often that explained, so I was trying to put some reasoning behind it specific to this case.
That's a good observation, and a valid question. It is one of those things that does NOT go into short form text replies, and takes very fancy college degrees and years of real work to really understand...
To "understand the concept" of stress risers, to a degree to be useful... That's hard because there's SO many nuances to it. But here is a real world example-
Find a plastic bag from "something", probably in the kitchen, where you've got to rip the top off to get to the zip loc section. You can rip on that bag all day long, from any direction you want, and you won't get it to tear open until you literally rip it wide open. Shredded cheese or Broccoli or chicken or bacon or something is gonna go all over the kitchen. Boom. That's the compressor switch stuck on and flat out blew up the whole tank. But on one corner of that bag of "whatever", the manufacturer has put a little tiny "notch". Pull on it right there across that notch, and it's not trouble at all to start the tear, and tear gracefully all the way across without excess effort (force) and without having a sudden catastrophic failure. That "slit" they cut in it, that's a stress riser. It concentrates ALL of your force on one, specific, minute point of the material. And the stress riser moves back as it fails. In the case of a compressor with a hole drilled and tapped on it, it's NOT the fifty, hundred, two hundred pounds on a pipe fitting that's drilled directly into it, it's the hole it's self And it's not the force on the fitting, it's the hoop stress around the entire tank. The diameter of the fitting, taken as a band around the air compressor tank in EVERY direction. Those square inches being pressured are trying to rip the hole apart by pulling the edges away. Then, on top of the stress riser that is the hole it's self, you have the thread. That little "V" in the thread in and of it's self is a more powerful stress riser. The ends of the groove make a thin spot, like the slit in the resealable bag.
Welded bungs are used because they are WAY thicker than the tank needs to be, so the threading is not an issue.. The welding captures a larger amount of material and it's very particular that it be continuous, solid, evenly welded. otherwise the uneven "hold" from the weld becomes a stress riser in and of it's self... That's the missinon critical and certifiable pressure vessel welding thing. It's mostly the consistancy of the weld, and the knowlege and experience to get that weld in there without causing excessive stresses from uneven heating/cooling in that process as well. (And testing and demonstration to prove it) And a certification valuable enough to not let a bad one out the door. The tanks are NOT hardened as a rule (I think never, but you never know), but as a rule, they're NOT hardened. They're a lower PSI, kinda ductle alloy of several metals (steel is the most common, but aluminum and others are used for certain things) that can handle the pressure cycling without fatugiue (i.e. not cheeze grade stuff), but nothing fancy. Most are just a mild steel that you couldn't harden if you wanted to. A good match for the cast steel bungs that typically get welded in.
Or, more examples are coming to me as I type this...... An inflated balloon and a pin. The balloon has a (relatively) lot of pressure against it's rubber "skin". If you just touch it with a pin (you need not even make a hole, just touch it), BOOM. That overstressed but NOT poked through part of the balloon under the pin became the weak link, and that balloon is in multiple pieces by the time you find it. BUT, down by the stem/knot, or right in the "dimple" at the top, where the rubber is thicker, you can actually stick a pin right in and out if it. Or, put a piece of electrical tape on the balloon, to reinforce one area, then you can stick a pin through it and it won't pop. Kinda like welding a bung over a hole on a compressor tank.
Or, some of the "heavy machining" channels on Youtube. Older Abom or Cutting Edge Engineering on Youtube if you happen to have seen any of those. Gearbox shafts and hydraulic cylinders, you hardly ever see a "hard" transition to a change in diameter. They'll go in with a button insert and make a radius, to the point of (on some occasions) actually reducing the diameter of a shaft to "fit" the radius in. With or without the radius, the shaft will be equaly strong, in tension or rotation depending on what it is, but you never see "hard" transitions. The shaft will be equally strong either way, rotational forces or plain tension/pressure forces, but without the radius, cyclic loading and unloading fo the shaft, a hard corner in a change in diameter is a stress riser. Even though it's strong enough either way, without that feature, it'll fatigue and crack very early at that hard transition in diameter.
So, here again, no science, because there's too much to share this way even if I did have a full understanding, which I certainly don't. But, the "concept" is a powerful thing. Stresses need to be spread out, or at least not concentrated. Stress risers are points in the snape of the metal, where the "imaginary lines" representing the stress in a material are brought together and caused to rise to a surface, which is, either catastrophic or gradual, is exactly where the crack will start.