A sense for pitch is learned. Someone who has no training in music, if he were to whistle randomly, would whistle notes that fall close to the pitches in the modern Western scale, which is 12 semitones, equally spaced, per octave. It's what people hear all the time, we get used to it.
We didn't always use equal temperament. Since Pythagoras the Western scale was based on ratios of simple numbers, like a frequency that differs by 2/3 or 4/5 from the base note. That was a problem for keyboardists and players of fretted instruments like the lute. When equal temperament was being pushed, people complained that it sounded wrong. They weren't used to it.
In India they use a scale of 22 notes. The Native American flute traditionally has five equally spaced holes, although modern flutes are also made that correspond to the modern Western scale so they can play in ensembles. All kinds of scales have been and are used.
But that music really was pretty bad.