Why does this LED matrix have two 5V and GND pins?

Power supply 5V / 3A (VH4 header input)

Probably because one pin can't handle 3A.