It's theory, not law, and is in large part cultural and contextual. Basically, the motifs that we are familiar with have a certain notion of consonance and dissonance...consonance being notes that sound 'nice' together (due in part to overlapping harmonics reinforcing the sound), and dissonance being notes that sound a little 'off' or 'tense' (harmonics that don't overlap, so you get a 'beating' effect as the harmonics go in and out of phase).
Note 'resolution' is basically going from dissonance to consonance, providing a pleasing sense of stability.
What is considered consonant and dissonant can change with time and culture, so it's not a completely solid relationship, but overall a general pattern (like the notion of 'Major' being happy and 'minor' being sad is not a universal association).
Note 'resolution' is basically going from dissonance to consonance, providing a pleasing sense of stability.
What is considered consonant and dissonant can change with time and culture, so it's not a completely solid relationship, but overall a general pattern (like the notion of 'Major' being happy and 'minor' being sad is not a universal association).