When you say "Why are the key signatures in the major key like this", you are misusing the words "key signature", so let's start by explaining that.
A key is a combination of:
- a choice of root note
- a choice of which set of notes are available to be played
In traditional Western music -- the musical tradition in which "major" and "minor" makes sense -- a key usually consists of 7 notes out of the 12 notes in an octave. For example, C major uses C,D,E,F,G,A,B. D major uses D,E,F#,G,A,B,C#.
A major key is defined by the number of semitones between steps. C to D is 2 semitones. D to E is 2 semitones. E to F is 1 semitones. Counting up the whole scale of C major in this way, you get 2,2,1,2,2,2,1.
A minor key is defined by a different pattern of semitone steps: 2,1,2,2,2,1,2
An easy way to understand this is by trying things out at a piano. A piano keyboard is laid out according to that major key pattern -- that's why some white piano keys have black piano keys between them, and some do not.
If you can't get at a piano or a keyboard, a computer simulation is fine. All of these patterns are just as valid on other instruments -- but the pattern of black and white notes on a piano make it easier to understand.
A key signature is a way of communicating which key you are using, by telling the reader which notes to sharpen or flatten. The key signature for D major is a sharp sign at F and another at C - because in D major you never play F or C, but you do play F# and C#. The key signature for C major is no marks, because you never play any sharps or flats in that key.
Now, back to the piano keyboard.
Consider the key of C major. What defines the key, is that you're using the 7 notes C,D,E,F,G,A,B. You are not using C#,D#,F#,G#,A#.
The basic chords are triads made up of:
- the root note of the chord
- two notes up in the key's notes (the third)
- another two notes up (the fifth)
Play the C triad - C,E,G - and listen. It's a major chord. As well as telling by listening, you can tell it's a major chord by counting the semitones between the first and the third. E is 4 semitones up from C.
Now play the D triad - D,F,A - and again, listen. You can hear that it's a minor chord. Count the semitones between the first and third. F is 3 semitones up from D.
Repeat this with all the other triads, and you'll find that C,F,G are major chords, and that D,E,A are minor chords.
B is special. In all those other chords, you'll notice that the 5th is 7 semitones up from the root note. However in the B triad, B,D,F, F is only 6 semitones up from B. That is what makes it a diminished chord.
To look at it another way - if you play the C major triad, then move all your fingers one white note to the right, then two of the notes go up by two semitones (C to D, G to A) and one goes up by one semitone (E to F). As you keep moving your hand to the right, the notes below each finger go up at different rates, causing you to sometimes play major chords and sometimes play minor chords.
Repeat this experiment in a different key. For example in D major, you have the notes D,E,F#,G,A,B,C# -- and don't play D#,F,G#,A#,C. Why - because that's what you get when you raise every note in the C major scale by two semitones.
You'll find that the chords that come out of the scale are the ones written in the chart you put in the question.