To answer my own question after edification from the community, the theory behind why the notes of a chord blend well together and the theory behind which chords in a major key are the major chords that work for that key are basically two different theories.
A major chord is comprised of a root, a major 3rd (4 semitones or two whole steps above root) and a perfect fifth (7 semitones or 3 and one half steps above root). These notes blend well together because of the way the sonic frequencies merge together and compliment one another verses clashing with one another. A chord can be formed using any note as a root note.
The chords available for any given key which will sound correct with that key based on music theory, are limited to the chords which can be formed using the notes in that key. Any given diatonic key will have 7 notes that are in that key and these are the 7 notes we can use to form chords that go with that key.
Since our melody notes will be taken from the notes in the key we are composing in, it follows that the chords that will sound good with the notes we choose for the melody, should be comprised of the notes in the melody. Therefore the chords that will support any melody in a given key must be formed using the 7 notes in that particular key. Using the 7 notes in a major key, limits which chords we can form and only gives us three options for major chords that can be formed using those 7 notes. And those 3 options for major chords will always end up being the I chord, IV chord and V chord (all major). Let's look at an example using the key of C major. The chart below was provided by Community member Patrx2 and perfectly illustrates this.
As you can see, the major triads which can be formed in the key of C major are the C Major (I chord) the F Major (IV) chord and the G Major (V chord). This holds true in every key.
While the foregoing explains why you don't have a choice of which chords you can use without venturing outside they key - it falls short of explaining why the I, IV, and V chord sound good in a given key.
To understand this better, we must revisit the idea presented in part one, that suggests that certain notes blend well together because of the way the sonic frequencies merge together and compliment one another. Our brains will instinctively have a desire to gravitate towards complimentary frequencies that will blend together to form pleasing sounds. The relationship between the sonic frequency of two notes is described in music theory as an "interval" which is how far apart the sonic frequencies are - commonly measured in what we call semitones (with one semitone being the smallest step in a Western Music chromatic scale).
The most congruent and consonant sounding intervals are the unison (same exact frequency or 1:1 ratio) and an octave (exactly double the frequency or a 2:1 ratio). It's easy to visualize how the sound waves will line up evenly and blend together if you have exactly 2 crests of one wave for every one crest of the second. Besides the octave and unison, the next most consonant (harmonious) interval is the perfect fifth. This is because the ratio between the sonic frequency of two notes that form a perfect fifth (7 semitones apart) is 3:2. Because these two numbers are small, the crests of the sound waves will peak at the same place more often than they would if the ratio were say 15:8. So any two notes with an interval between them of a perfect fifth, will sound good together.
If we start with the note of a particular key (say C in C Major for example) we can get to a perfect fifth interval from there by going up 7 semitones which lands on G if we start with C. That happens to end up being the 5th note in a diatonic major scale. (1)C (2)D (3)E (4)F (5)G. We know, that the interval between C and G in the key of C major will result in two notes that blend together because they form a perfect fifth, and we know that these notes will sound good together whether they are played at the same time or successively.
So if we build a chord using the G note as the root of the chord (since G is on the other end of a perfect fifth interval from the home note of our key (C), and that chord is formed using only the notes in our key, then it makes sense that the chord (in this case G Major) naturally evolves from the tonic I chord - C Major (which uses our key's home note as it's root). It's like we use the tonic chord and pivot to the G chord because the G note is a perfect fifth interval using C at the other end. So the chord using this note as the root (G major) evolves naturally from the tonic chord C (with C as the root).
If we pivot from C in the opposite direction on our piano keyboard (or our scale carried out over several octaves), and we count in descending order seven steps to the note that forms the other perfect fifth that can occur in the key of C major using a C as a note on one end of the interval, we land on the note F - seven semitones from C. So if we use our home note (C) as the anchor point and count a perfect fifth descending, we get the fifth interval formed with the notes F and C. So if the interval F to C is a perfect fifth we know those notes will blend together in a harmonious manner. We know that using C as an anchor point in the key of C Major, we can reach a perfect fifth using the C in two and only two ways - ascending the scale by 7 semitones to get to G, or descending the scale by 7 semitones which lands us on the other option - F. So if the relationship between the C and F can also form a fifth interval, it makes sense that leaving C Major and going to a chord with a root based on F (F Major - our IV chord) or going from an F back to C, will sound natural in the key of C Major.
To further illustrate why the IV and V chord segue well with the tonic I chord which anchors the key, I might point out that the next most consonant interval between notes is the perfect fourth with a sonic frequency ratio of 4:3. If you start with the triad that forms the tonic chord of a given Major key, and use the root note of that Major triad as the anchor point, there are two notes you can reach that will each form BOTH a perfect fourth interval AND a perfect fifth interval using your home note of the key (which is the root note of the tonic chord) as one end of the interval.
Again using the key of C major for illustration, the interval between C and G is a perfect fifth and the interval between G and C (same two notes now inverted) is a perfect fourth. Thus using C as an anchor point, and G at the other end of the interval, you can form both a perfect fifth (if you ascend from C) and a perfect fourth (if you descend from C). Remember, these are the two most consonant (pleasing sounding) intervals available outside of the octave and unison. You can also achieve this same feat using one other note - F. The interval between F and C is a perfect fifth and the interval between C and F (ascending the scale) is a perfect fourth. Again the C is the home note or anchor point.
This provides further logic to explain why chords with root notes based on the two notes in the diatonic scale for a particular key, that are each capable of combining with the home key note to make both a perfect fourth and perfect fifth, will be the most stable sounding chords in that key and will naturally evolve from or resolve to the tonic (I) chord that anchors the key.