To try and make it really ELI5: things make sounds in very special ways. When you pluck a string, it makes noise. But if you take a string half that size and pluck it, it makes a different noise. People realized that certain ratios of string size made different noises and that some “easy” to make lengths sounded good.
Over time people agreed on certain ratios that they liked for making sound, and those eventually became scales. There’s all sorts of reasons for what was chosen (like trying to figure out what older musicians did) but generally things were chosen based on what we thought sounded good, and what was “easy” to make.
The reason that an octave (12 piano keys starting on C with 7 white keys and 5 black ) looks like it does is based on how we manufactured keyboard instruments to play those ratios mentioned above. Most instruments can’t play the ratios perfectly (only a subset sound really good, so certain instruments sound best playing certain notes). The keyboard instruments futzed with the ratios to make all the notes sound “okay” (at the cost of making each ratio a little less pure). They then put some of the most common sounds (like those that make up the key of c major) on big white keys while making the less common sounds (like g#/a-flat) on smaller black keys. The arrangement is also designed to make the sounds easier to play with your hands.
Also, “major” and “minor” don’t refer to key colors on a piano. Major and minor scales refer to certain patterns of intervals between notes. One particular pattern (whole step, whole step, half step, whole step, whole step, whole step, half step) makes the major scale. A different pattern makes the minor. There are actually lots of different patterns that makes up lots of different scales. Some are common (the “melodic minor”) others are rare (the “Phrygian mode”). The Major and Minor scales are just most common
Latest Answers