I only think it's a coincidence, but thank you for ending my day wonderfully, Austin
It's probably not. People who work with music and sound do that all the time. The hear something cool and random, and then they take that and in put in their own work. I don't think it's ilegal as long it's song minor and it's mixed with a bunch of other sounds.
I remember one cut-scene from Parasyte Eve 2 with the main character watching TV and one of the (many random) sounds that were coming from the TV was a guy saying in Portuguese: "all these products for only...". Turn out, it was the guy from a Brazilian TV comercial. Tottaly random. lol.
Probably was remixed but they probably didn't realize they did it. A lot of producers and the like will pull samples from various places and tweak it. Maybe Mario was just on the menu today? It's one reason I detest the whole genre. I find it genuinely talentless.
Probably both SM64 and the JB song used the same panflute sample. I don't know why anyone would assume they got it from SM64, unless this is a joke?
It's not even possible to say how similar they really are.