It dawned on me as I was practicing the other day that there is a special relationship between a rhythmic downbeat and a melodic root note. Not just that they frequently happen together, that would be boring. Both are about people's expectations, and denying people's expectations can be a powerful tool in your arsenal.
Both the root note and the downbeat are essentially "home base". A downbeat, particularly THE downbeat, is the beginning of a rhythmic phrase. When we are counting, it is "1". If this were a JavaScript program it would be your entry point - index.js or main.js. The root note of a scale is the tonal equivalent to that - when we are playing in C minor, it is the note "C". It is the note we expect to come back to at the end of a phrase, the same way we expect a rhythmic phrase to end just as we are coming back to "1".
When you don't give people that satisfaction, it can create interest or unrest in your music. It can be used to make something really memorable and different.
Take Meshuggah for instance. They are extremely good at messing with rhythmic expectations. It seems like whatever you are expecting them to do, they refuse to do it, and somehow they do that while still making you nod your head. If you're expecting a riff to land and have a loud hit on that downbeat, then they will anticipate it and land a half beat earlier than you were expecting. After you're used to that, they'll throw you a different curve ball and land a riff a half beat after the "1". Then, once you're sure you've got a handle on the fact that their hits will come either early or late, they'll stop teasing you and finally land on that natural "1" downbeat, making it sound huge while somehow unexpected.
Even though many of their riffs stay in a standard 4/4 pattern, this has the effect of making you think they are playing in odd times and making their phrases longer and more complex.
There is a melodic equivalent to this as well. You can achieve a very memorable and unique dissonance by denying the listener the release they are expecting by going to something like a relative minor or major when they are expecting the root note at the bottom of your chord. In the case of a melody or a riff in C major, this trick would dictate that you land on A when your listener is expecting to come back to C. Take this a little farther and you could reharmonize a C powerchord (which is a perfect 5th of C and G) by adding a bass note that is not in your original scale. Adding an Ab under that would give you an Ab major 7 chord. It's all about pushing and pulling on your listener's expectations
I've been so focused on software lately that I keep almost typing "User" instead of "Listener". Good lord.
Anyway, some bands take this technique even further. They will start their riffs and melodies in one scale, and then switch halfway through into another scale - not just reharmonize with different bass notes. This is very dissonant and disconcerting at first, but if the melodies repeat, if they are still well structured patterns, your ear will still latch on to it. Try making your lead melody climb upwards in pitch using one sequence of 4-5 notes, and then slowly spiral back down using a different sequence of 4-5 notes from another scale or mode. Make each sequence of notes have a coherent relationship to each other, but take each group from a different scale.
If you expect something to repeat and it changes, this can create a lot of interest. You can do the melodic equivalent of what Meshuggah has mastered rhythmically. Of course you can do interesting things with notes and rhythms together, but they can be used separately to really toy with people in interesting ways too.