I realise not all keyboards have the NumPad, but
why do those who do have a NumPad have two sets
of keys for numbers?
Well, it wouldn't be a numeric keypad if it didn't have numbers.
The answer is surely "because it is exceedingly useful".
I'm a programmer; I don't use the numeric keypad for numerics in programming, when I'm typing "all characters". I'm expecting standard typewriter layout when I'm doing that.
But I do use the keypad when working primarily with numbers -- e.g., in calculator programs, personal-finance programs, and (oddly) when entering numeric codes from two-factor-authentication text messages.
The usefulness appears to stem from the fact that I can type all digits with one hand, freeing the other up for holding whatever I'm reading from (bank statement, phone, whatever).
So why not just have the numeric keypad? The answer is, it costs nothing to retain the top-row digits even though you've added more keys. You can't usefully use those shifted key positions for anything else: you'd end up with a non-standard layout that no-one would want.
I see no downside to having two sets of digits. I wouldn't buy a keyboard that didn't have a numeric keypad.
(Laptops are an exception due to size).
My experience with numeric keypads separate from the main typing array goes back to the 1977 DEC VT52, though I admit that there I mostly used it in "alternate keypad mode", for text editor commands.