When can you use a comma before "because"?

I learned from school that you never place a comma before "because"; however, in the sentence below, that rule is broken.

"On the SAT, dashes will most often be placed on either side of an interruption in the middle of a sentence, because this is its only unique function.”

So, when can you use a comma before "because," "since," etc.?

A comma is sometimes used before the word "because" in a sentence to avoid ambiguity in interpretation of the additional information. In the case of the sentence you provided here, inclusion of a comma is the best way to clearly convey the fact that the writer is referring to the "interruption" rather than the "dashes." The clause after "because" is describing the indirect object, not the main subject as you might assume at first. To make this distinction clear, a comma has to separate it from the rest of the sentence. You can change the meaning of a "because" sentence with the inclusion of a comma, so it all depends on what you're trying to say.

For example, "I didn't want to kill the spider because it was poisonous" could imply that you do still want to kill the spider, but the reason for wanting to kill it is not specifically related to its poisonousness. Maybe the spider wronged you in some other way. However, if instead you wrote "I didn't want to kill the spider, because it was poisonous," this clarifies the meaning of the sentence. It makes it clear that you didn't want to kill the spider, because it was too risky to get close to its deadly fangs (I just used the same concept in this very sentence!). It's usually not technically grammatically incorrect to leave out a comma before "because" in a sentence, but it's often critical to do so if you want to clarify your meaning.

Source