You are scratching the surface and getting somewhere ... (and I don't claim to be a subject matter expert myself, although perhaps I've been scratching that surface for a while now)
Intake and exhaust system flow is not steady state - far from it. It is a train of pulses that travel at the speed of sound inside whatever chamber or pipe is containing them. Complicating that ... especially on the exhaust side, the speed of sound is not a constant. It is a function of temperature (specifically, it is in proportion to the square root of the absolute temperature), and that means it's high near the cylinder head and drops off as the gases lose heat as they pass down the pipe. So the diameter matters but also the length of each pipe section matters. The length affects the amount of time a pulse travels down the pipe, reaches a junction or expansion which reflects it back up the pipe as an expansion wave, and then travels at the speed of sound against the direction of flow (important!) back up the pipe towards the engine, and hopefully that pulse arrives back at the engine at some time that is useful (e.g. during the short period of time when the exhaust valve is not quite closed and the intake valve has just started opening - "overlap" at TDC between end of exhaust stroke and start of intake stroke).
The header pipe generally has a length such that near the maximum-power RPM, that negative pulse arrives near the end of the same exhaust stroke that initiated it (roughly half a crankshaft revolution - perhaps a little less).
The complication is that this isn't the only thing going on in there. After the pressure wave passes that junction in the collection, it may be reflected back up that header pipe as a negative wave, but it continues down the mid-pipe and up the OTHER header pipe as a positive wave. When that positive pressure gets to the closed valve in the other cylinder, the pressure wave has nowhere to go, and gets reflected back down the other cylinder's header pipe as a weaker positive wave. Meanwhile the one going down the mid-pipe reaches an expansion in the stock exhaust system's collector/catalyst box and that gets reflected back upstream as a negative wave. An aftermarket exhaust doesn't have that collector-box but eventually that pulse gets to the muffler which acts like an expansion as well.
All these waves get superimposed on top of each other and the net result is a really, really, really complex hard-to-analyse mess. On top of that, you have the fact that this engine has an uneven firing pattern. One cylinder fires, then the next one half a crank revolution later, then there's 1.5 revolutions until the next one. These wave reflections don't just affect the end of the same cylinder's exhaust stroke, they also affect the next cylinder in the firing order, and the one after that ... It's complicated. Something about this complicated mess leads to some of these wave reflections turning out to be undesirable, which may have something to do with why these engines seem to like having a quiet muffler on them.
As an aside, the Hindle exhaust system on my bike uses header pipes with a nominal diameter of 38.1mm (1.5 inches), and after the collector 50.8mm (2.0 inches). I am quite convinced that these diameters are chosen for one simple reason, "that's the way they build all of their exhaust systems unless it absolutely can't be done that way". Yamaha R1? Same diameters. Yamaha R6? Same diameters. It's easier to manufacture. I suspect something with enormous cylinders, like a Ducati twin, might differ. But by default ... that's the way they're built.
A decently-healthy R1 or other 4-cylinder superbike makes about 45 horsepower from each cylinder (the horsepower is very close to in proportion to the mass-flow-rate of air/fuel/exhaust through the engine). We make half that. I'm pretty sure Hindle's diameters are too big for the engine. A header diameter that is too small will restrict the flow out of the cylinder, which is very bad. A header diameter that is too big will weaken the effect of the pressure waves, which is sub-optimal but not horrible. So, Hindle makes them somewhat too big by default.
The right configuration is probably stepped or tapered, starting at whatever the diameter is at the port in the cylinder head, and then stepping up at carefully-chosen positions down the pipe to manage what the pressure waves are doing. But that is not simple to manufacture...
Some exhaust systems have a little cross-over pipe partway down the header pipes ... that acts like a controlled expansion point. I've seen some for the R3 that are clearly using smaller-diameter header pipes than the Hindle uses, but with a cross-over pipe. I've seen some stepped/tapered ... I think the Graves is like that, but no Graves exhaust for me, $ $ $ $ in Canada. (I chose the Hindle because they are built locally, there is ample local support, and they are a long-time sponsor of Canadian roadracing.)
Yamaha put reasonable design effort into the stock exhaust system. They have emissions and noise constraints to keep in mind, but also driveability, mid-range torque, etc. For a street bike ... if you are not necessarily in search of every last bit of top-end horsepower ... "leave the darn thing alone" will not be far wrong. And it's certainly cheaper ...