TL431 Vs Error amplifier
The LM431/TL431 is an adjustable zener diode, with somewhat more stability with temperature (TL431 is better). The suffix identifies the temperature stability and static accuracy. It works very well in SMPS loops because it is often driving an opto-coupler which throttles the PWM to regulate the output voltage, often with better than 1% load regulation. In this case an op-amp would have to emulate what a TL431 already does out-of-the-box. The TL 431 is a combination precision Vref, op-amp and NPN current sink.

An op-amp is best suited for PID loops as integrators, with correction time in microseconds. This can be a bipolar powered circuit for constant RPM motors under CPU control, so a well tuned PID loop is very important. Professional grade power amplifiers often use an op-amp for excellent DC stability. Other than a master Vref, the TL431 cannot do much else in such circuits. However in linear power supplies you will find the TL431 in great use. My Chinese-made triple power supply uses several of these for a master Vref for each independent supply.