A comma is not needed before because, even if what follows, if you remove "because" is an independent clause.
I poured the beer slowly because if not my glass would be half foam.
"If not my glass would be half foam" is a dependent clause.
I poured the beer slowly because I didn't want a glass half full of foam.
"I didn't want a glass half full of foam" is an independent clause.
A comma is not necessary in either one because "because" makes the whole independent clause dependent. "Because" is part of the clause, not just a connector like "and" or "or."
The clause is "Because I didn't want a glass half full of foam," and not, "I didn't want a glass half full of foam." This makes the clause dependent, thus no comma is necessary, but for clairity or flow, one could be added without rousing the feathers of grammarians.
The clauses could be reversed, then you need a comma.
Because I didn't want a glass half full of foam, I poured the beer slowly.