They didn't release anything willingly. KHTML was LGPL so they were forced by the license to release it as open source. However the LGPL allows building apps on top of libs without releasing them as open source though and that's what apple did, they did not release Safari as open source, only webkit. So everything they could release as proprietary they did, they only open sourced the parts they were forced to.
To be fair, they later rewrote KJS as JavaScriptCore and released it as open source using the BSD license, and also WebCore and more. See http://apple.com/opensource/ for more. By that time, many companies including Microsoft realized that releasing and contributing to open source was not only beneficial but also unavoidable.
Well this was also after a year of working on a fork in seclusion. The project by then had diverged quite a bit, and had quite a differing philosophy from the original.
Back in those days, Apple was all about open-source - I still have an OSX 10.2 (Jaguar) box somewhere where the main headline is about Apple and open-source.
While there might be less shouting about open source contributions nowadays, arguably the contributions themselves are much more useful.
Certainly WebKit has been widely adopted outside Apple, clang/llvm is slowly, but surely gaining converts, and libdispatch is IMHO deserving of wider interest, even though it may not be widely adopted on non-Apple platforms.
I think they were just trying to piggy-back on BSD reputation as stable and mature system, so they played the buddy-buddy card. Once OS X settled in its place, this was no longer needed, so the open source love faded.
Actually open source has been a huge part of Apple ever since they acquired NeXT (or was it the other way around). The majority of OSX/iOS is open source and they have contributed in big ways to a number of projects e.g. LLVM, OpenCL, GCD, LaunchD, ZeroConf.
That said, it is rather simple to consider : as a general idea, the UI layer (Cocoa for OS X, CocoaTouch for iOS) and a few other things are closed. The rest is pretty open, as darwin in general is OSS.