I notice that when I whistle or hum to a song I can always "jam" along and I'm almost always in the key. I think this trait is built into humans or something as I could do this since I was a kid, and I'm sure everyone else can. Irrespective of understanding keys or theory.
I think many people can, but I've met plenty that have some difficulty in confidently repeating or following a melody. Nevertheless I think you're right to conclude that for most people, the ability to know what a melody sounds like, and predict and generate a melody, isn't something that derives primarily from studying theory.
So my question is, is studying keys really just a "hack" to get to a point where you can "whistle" with your fingers when playing piano..?
Any scale patterns (including those implied by keys) are abstractions - a way of looking at something from a certain angle by considering only a certain amount of the information at any one time - in this case, the set of notes being used by a piece of music.
Abstractions are useful to help people notice relationships between things, classify things, and remember them. The idea of using abstractions is a hack that we all use every day to do (some) things better than we did yesterday.
In the case of music, learning scale patterns can help us learn how to whistle or play an instrument, because it gives us the chance to make more mental connections between the things we observe.
We all make up our own abstractions even in the absence of formalized theory, but the advantage of using agreed, formalized abstractions is that it also helps us to communicate with others.
And at that point all theory becomes meaningless?
Depends what you mean by 'meaningless', I guess! Is a hammer meaningless once you've used it to put up a fence and then put it away in the toolbox and forgotten it? Arguably it is, until your fence blows down in a storm and you need it again. We need musical knowledge to be able to do music, and formalized theory can be an important part of that knowledge.