A only changes rows when the candidate through B is smaller.
A does not replace itself
The candidate for A through B is 2, but A keeps its self distance 0.
B ties the current row
The candidate for B is 1, equal to A's current B distance.
C improves through B
The candidate for C is 3, which is smaller than A's current 5.
D becomes reachable
The candidate for D is 5, replacing the toy infinity value 999.
Summary
Only smaller candidates change the table; in this update, C and D both switch to next hop B.
improved rows=2