Even though they have identical names, they’re used in different context, the top one is to be used specifically with material collections, and the bottom one with dynamic material instances:

You would normally get the 2nd node if you dragged a wire from a dynamic material reference node but you can also disable ContextSensitive in the the roll-out menu with all the nodes.