Tbh porting is bloody hard when dealing with what are likely VERY different hardware setups. Consider
https://en.wikipedia.org/wiki/Nintendo_64_technical_specifications vs
https://en.wikipedia.org/wiki/Nintendo_Switch#Technical_specifications - it's not just a matter of different CPU and GPU, they likely communicate with each other in different ways. It's also likely that few people are still around with the skills to understand N64 code (if the source even exists still) well enough to translate it into something suitable for the Switch. And the end result is that you have something that isn't portable - it won't work on another system.
In the IT world we're all moving towards emulation and containerisation - the idea of having code run in a controlled environment that may not match the host. My dev environment is in a virtual machine because I can't be arsed to set up a linux dual boot on my laptop and because I can copy that environment to different places, and the code I build runs on Docker to guarantee it'll work anywhere and always get a guaranteed environment, regardless of whatever else may be going on. With that in mind I can understand Nintendo's thinking here, and if it is a prelude to a virtual console N64 then it makes even more sense.