You are confusing copyright and patents. Copyright is about the code, patents are about ideas.
KHTML was clearly not the first HTML rendering engine. Sir Tim was the first to do that, but then
HTML is just another markup language, so the prior art goes back way into the 60ies. KHTML is no
doubt a great piece of software (and very much non-trivial to write), but there is nothing overly
novel in it.
Similarly, 4.4 BSD in particular and Unix in general consisted mostly of ideas that were present in
one form or other in earlier (research) OSs.
What you are realizing is that producing open source software, even (L)GPL software, may help
parties that you do not agree with. But that is the price of free software.