They don't taint in the GPL sense.
Apache and BSD licenses are founded in a radically different point of view and
intent than GPL. The whole point of GPL is to prevent anyone from closing off
(making proprietary) the GPLed code, or from being able to profit on it
without freely contributing the derivations back to the GPLed product. That's
why derived works from GPL source must themselves be GPLed.
I won't recapitulate the whole FSF argument for GPL or why it's so restrictive
against commercialization (as some may see it). I'm only pointing out that
there's a spirit and a philosophy behind GPL, and doing non-clean-room
implementations of GPLed code without GPLing the result is a total violation
of that spirit and philosophy.
But, hey, if you're the kind of person who would exploit an idealist's hard
work and innovation that way in order to save yourself the trouble of
independently doing that work yourself, and you don't mind risking the legal
fees and hassle to defend against a copyright-infringement suit, and you can
face yourself in the mirror in the morning for doing all that, well, I sure
can't stop you from your ruthless actions, though I might cheer the FSF and
the copyright holder for instituting the aforementioned lawsuit.
For the record, the "you" in the above is rhetorical. If the shoe doesn't
fit, don't wear it. I certainly am not referring to Mike Schilling nor Arne
Vajhøj.
But seriously, why not GPL the derived work? What harm? You'd support the
idealism of the author whose work you're leveraging, you'd have that lovely
product with the benefit of the work you copied, you'd do others with a
similar need a lot of good, and you can always monetize the result one way or
another without violation of the GPL. And you won't have to put yourself in
the position of arguing for what's at best a morally ambivalent stance; you
know that GPLing an adaptation of GPLed code is kosher.