To me a flavor profile is a combination of the individual flavor characteristics that define or influence the taste of something. I'm not sure if "matching flavors" is what I always shoot for, sometimes I think it's more like "complementary flavors", or a "balance of flavors".
A good example would be a flavor profile for a steak. I like salt, pepper and granulated garlic. They don't really match, but if balanced correctly they compliment each other and the steak. On a scale of 1 to 5, lets call this flavor profile a 3. Taking this same flavor profile one step further..... Sea salt, a blend of white pepper, black pepper & cayenne along with granulated garlic would, in my eyes, improve the flavor impact and change the profile to a 4.
So, back to your question. The first step in a rub is to balance the salt and sugar. I probably would have some pepper on the sidelines ready to use as an accent flavoring when the time is right. If the rub is a poultry rub, I might select and work with complimentary flavors from herbs or spices that I like with chicken (maybe onion, celery seed, thyme or sage). So I would call that matching and balancing. Lastly I would work in some pepper. To improve the flavor impact and tickle the profile, I may choose some lemon pepper instead of just black pepper.