First off, I'm not claiming that practising scales isn't a good thing to do. I'm just curious what specifically it teaches you that doesn't come from playing music.
I'm aiming it as a generic question since it seems common to students of all instruments, but answers targeting individual instruments are fine.
One thing I see is that it teaches you the physical/mechanical action of playing a note, whether that is training all your fingers how to press a piano key, your hands and embouchure how to form each note on the flute, etc. But that's a pretty low-level skill which doesn't require lots of different scales.
So what skill/knowledge does ingraining scales into your "music brain" impart, that makes you a better musician? Is it a bit like in the Karate Kid where seemingly pointless actions turn out to be the foundation of useful technique?