For any game, the odds are that it has unused assets or partially completed systems that hit the cutting room floor.
https://arstechnica.com/gaming/2020/01/how-to-get-star-fox-6...
Ocarina of Time started with the Mario 64 engine, so there are probably bits and pieces all over.
I'm honestly curious, i've never actually heard any theories about Luigi and mario 64 other than he just cut due to above mentioned reasons. Much like Yoshi.
Why delete it? You never know if they might reinstate it (before release that is, and why bother deleting on release day?) or the model could be used in another game, making them costs money, storing them not that much.
The space obviously wasn't needed during development (this is leaked source, I don't know if it made it to the gold version) so there's two likely possibilities:
a) They knew about it but didn't have the dev/tester time to vet the change. This is coming from an era when most game testing was done manually and the N64 toolchain had some big issues around launch. Higher priority fixes might have just pushed a cleanup task like this off the list.
b) They just didn't know. This is also from an era where DCVS weren't particularly common in the games industry and CVS was still black magic in some circles so auditing changes or doing code reviews were very rare.
Also, as a developer (game and webdev), there's tons of leftover stuff. Most of which is assets. For games, the artists would've put them in the codebase at some point. For web, it's usually just forgotten when removing features.
Unfortunately, many game companies lost the source code for their classic games years ago. They couldn't release it even if they wanted to.
One of the big surprises coming from this leak is simply the fact that Nintendo's source code still exists. The company seems to have been very thorough in archiving material related to its older games.
Now if they'd just pay the emulator people a bucket of cash to make officially supported emulators that run on the Switch and all future hardware (without having to rebuy the titles), they'd make so much money they'll be around for the next 300 years.
Edit: Could someone downvoting explain what is wrong with my comment? We would all love to have source code of everything because that's what we like to dig into and hack on, it's also a fact that it isn't required if the goal is preservation.
Curious find though. Always wanted to play as Luigi in the game back in the '90s.
http://www.pcgamer.com/amp/gigaleak-of-alleged-nintendo-sour...
And here is its 3D model loaded in Blender with textures preview mode ON.[1]
[0] https://www.nintendolife.com/news/2016/12/random_a_glimpse_o...
https://old.reddit.com/r/emulation/comments/hxtqei/seems_lik...
# Once it's deleted, there's no way to get it back.
# Version control isn't reliable.
But worse in all other cases. If your decision process is such that that weighs in favor of cluttering your codebase with dead code, that's a problem.
And, actually, since the commented code almost certainly isn't being maintained and uncommented for testing as the rest of the codebase evolved, it's probably not even better in the case that decisions are reversed.
> Once it's deleted, there's no way to get it back
There's rewriting it in light of the actual requirements and current state of the rest of the code base.
> Version control isn't reliable.
Neither is unmaintained, commented-out code dragged along with your code base. If your VCS isn't the vastly more reliable of those two things, that's a problem you ought to address.
(Of course, at the time of Mario 64, the calculus might well have favored a different approach.)
I think we need better tooling for browsing historical artifacts that may be valuable in the future -- which I think is the main reason I've seen people intentionally keep dead code. Maybe the solution to that is to just tag the commit in which you deleted the code with a note on what it was so you can find it again.
Edit: An uncle comment mentions that this may have been a discovery from digging around in the CVS history for the game, so they may have kept the assets in source control after all! Some might reasonably take away from this to protect your source repo, but I think it's pretty cool it's possible to find these historical artifacts.