It's two abbreviations joined together Num- and Py- so they keep their pronunciation. You'd have to ask why is Python pronounced as "pai"? Another example with similar pronunciation is Pythagoras. That's a less easy question to answer due to words like pyramid, pygmy that start with a reduced i sound (sorry can't type IPA on my phone).
When you have a consonant and a Y, it's generally quite common for that Y to make an "ai" sound. Like bylaw, dynamo, kyle, lying, rye, xylophone. So I'd say that Python's pronunciation is unexceptional.
In the case of pyramid, it comes from French pyramide so it follows the pronunciation of French. It's worth noting that both pyramid and pygmy have alternate/misspellings that use "pi" which shows that their spelling as "py" is not very natural to native speakers.