I think it's easiest to understand these things qualitatively.. yes it is in the linear mode of operation, but I often think about it more in terms of causal X and Y relationships.. If X happens then the circuit does Y.
In the first example, the TL431 really wants to regulate quite precisely at a particular voltage so if the output voltage overshoots, the TL431 pulls really hard through the opto, a lot of light shines across and the COMP pin gets decked into the ground. If the voltage then undershoots, the TL431 switches the LED off and the switcher goes crazy again. This is loop instability, and your output voltage oscillates around and below the setpoint. You need some "analog" in the system to calm things down (filtering, and various knees in response curves).
Ideally what you want is that as the output voltage reaches its desired point, the TL431 juuust starts pulling enough current to switch the opto on, which juuuust pulls the COMP down enough that the power supply cools off enough to supply the output load at the desired voltage. The trick is, this bias point needs to allow for a range of output loads, temperatures, component tolerances etc. But having succeeded in picking a good bias point, then you are into the realm of small effects where the output voltage gets a tiny bit higher, the TL431 pulls on the LED a tiny bit more, and the COMP bin just whispers down a few millivolts and the system stays at its regulation point. The COMP pin feedback network has a capacitor for "fast" filtering and an RC for "slow", so it can tame a couple of types of instability.
The second example is the same thing in a cheap and nasty way, as voltage goes up TL431 turns on Q5 which yanks on the COMP pin. Since there's no filter network on the primary side this will be pretty brutal, and I expect HVDC is fairly loose with its regulation requirements.