For example, there's the classic prohibition to avoid parallel octaves and fifths. It's not because it sounds bad - in fact, it often sounds great. The problem is that voices moving in the same direction (parallel movement) and on strong consonances (octaves and fifths) lose their independence, and no longer sound like counterpoint.
I was always baffled, hearing that "rule" over the years, since lines played in parallel intervals like these sound so awesome. To my mind it was the ultimate example of an absurd, arbitrary rule that existed to be broken by Beethoven and dopesmoking hipsters.
Then a composer explained to me that the prohibition isn't on parallel movement of entire lines, it's about parallel movement for a
single step. In other words, if at any point you have two lines with notes pitched a fifth apart, the
immediately following notes must not also be a fifth apart.
Why not? Because, it was explained to me, if you're hearing two melodies in counterpoint, it's OK if they pass through different harmonic relationships, including octaves, fifths etc., as long as they
keep going. But if they hit on a fifth and then the next interval is
also a fifth, the effect is going to be that of two lines collapsing into
one harmonized line. (If you think about the limiting case of unison, it's really easy to imagine how that would sound like a "hole" in the players that opens up and then closes again.)
I hope I'm stating this as clearly as this guy did, it clarified decades of confusion on my part.