I know a fair few scales......classically trained guitarist originally, then moved on to blues jazzy electric stuff so I've learned a lot over the years. My personally experience seems to be very similar to that of CamdenRob.....starting out, I wasn't hugely naturally gifted-struggled to play anything by ear etc so knowing the theory of how music worked and what notes worked over which harmony etc was my way of being able to function when playing with others. As the years have gone on, my musical ear has improved somewhat and especially on bass, I play pretty much by ear. Still though, when my band is jamming a new song and I'm struggling to get the bassline to work, knowing a few different arpeggios and scales that will work over the chords means that I'll usually come up with something that I can work with.
I know people that have graduated from conservatoires that would struggle to work out three blind mice by ear, and would freeze if asked to improvise a five second fill. I also know people that are professional players that can't read a single note of music and their theory extends as far as knowing the difference between major and minor, but rock up at a gig, join in without knowing the key of the song and play all night by ear. In my opinion both approaches are equally valid.....the best musicians that I know combine both skillsets.