TL431 output voltage
The TL431 is a high gain device with an internal voltage reference. When the external input is slightly above the reference voltage, cathode and anode are effectively connected together with a low resistance. When the external input is slightly below the reference input, cathode and anode are, in effect open circuit.
So, if you use two resistors to form a potential divider from cathode to anode and connect the middle node to the reference input, due to negative feedback and internal high-gain, the reference input acquires the same voltage as the internal reference voltage (2.495 volts typically).
So, we have a potential divider where the TL431 adjusts/shunts \$V_{KA}\$ to make \$V_{REF}\$ = 2.495 volts hence, the resistive potential divider equation is: -
$$\dfrac{V_{REF}}{V_{KA}} = \dfrac{R2}{R1+R2}$$
$$$$
$$V_{KA}= V_{REF}\cdot \dfrac{R1 + R2}{R2} = V_{REF}\cdot\left(1 + \dfrac{R1}{R2}\right)$$
$$$$
That's the basic formula but if you want to factor in the slight error caused by the reference input bias current (\$I_{REF}\$) then that formula becomes as stated in your question and the data sheet.
Proof that imagines R2 to be in parallel with \$R_{REF}\$ where \$R_{REF} = V_{REF}/I_{REF}\$: -