I tried making things like a 7-TET keyboard in JS at some point and concluded that they probably picked 12 because there are a lot of factors and it's a manageable number. Almost no two notes sounded harmonious on my 7-TET. I know plenty of cultures use other scales too.