Differences are what make art interesting and engaging. There are infinite possibilities of differences we can have in our art. Differences of scale, texture, value, and color are just a few. If we want to showcase anything in our art, it is helpful to place something that feels different next to it. For example, if we have a shape in our art that we want to feel very big, we can place a very small shape next to it. This will make the big shape feel even bigger. This small shape can be very small, however, if it is so small, say the size of a period at the end of this sentence, it will be SO different and unrelated, that the viewer will no longer make the comparison, and the potency of this difference will not be noticed. The period-size shape and the very large shape are simply too different. They become unrelated.
Difference of colors can work this way, too. If the colors in your art are mixed without any of the other colors in them, they sometimes can feel unrelated. Colors that are in harmony will often feel more related, making your art hang together better as a whole. It's completely fine to use unrelated or harmonized color in your art. It is only important that you understand both.