There was a time when basses and keyboards had a lot more in common.
Let's imagine you own a clavichord (which BTW came in fretted and unfretted versions). You don't get in a clavichord tuner every six months like you do with a piano, because clavichords have light, wooden frames, and they don't hold their tuning that long. Nope. You tune the thing yourself at least every week, and you'll generally do some fine adjustments every time you play it. Fretted clavichords were popular because they only had half the strings to tune.
Here's a home brew tuning method. Get middle C in tune with a tuning fork. Now play middle C and the G above it, and tune the G until you can hear that it's exactly in tune with the C. When the beats disappear, the notes are precisely in tune. You can now tune the F to the C in a similar way, and if your ears are good enough, you can go right through the middle octave, tuning each note to the C. Finally, tune the notes in the other octaves to the corresponding notes in the middle octave.
What this gives you is "Just Intonation" The frequency of each note is in exact proportion to the frequency of the C, and therefore exactly in tune, and it's not just theoretical. You can hear it. What's more, the clavichord has the sort of tone that makes the most of slight tuning differences, so you have to be really accurate and train your ears.
This is fine if you want to play in the key of C. Everything sounds wonderful. Now play a piece in F#. It sounds utterly horrible. That's because all the intervals are related to C. Use F# as your keynote without re-tuning all the intervals, and they're all wrong. There is no way round this; it's a fundamental property of music and harmony.
You can only get everything precisely in tune in one key.
We can dispense with the key of F#, but we can't play everything in C. We can get away with playing in the closest related keys of G or F. They're slightly out, but not horribly so. Let's move further away, and try pieces in D and Bb. Now the tuning is getting a trifle offensive. By splitting the black keys, e.g., into D# and Eb, we can play in more keys.
Or there is another solution – equal temperament. We drop the perfection of just intonation tweak a few of the notes so that a respectable number of keys sound acceptable.
Equal temperament sounds OK on a modern piano, because it has a very thick sound that masks slight tuning errors (ditto for electric bass). But you don't use it on harpsichords or clavichords, because it sounds slightly "off", but at the same time bland and boring.