It’s been the subject of many guesses as to what it originally meant
My personal favorite is “So!”
That was the joke.
Never knew that - always supposed that, OK, it looks like “What!” and was pronounced more-or-less the same.
Oh, those goofy Anglo-Saxons.