I'm not entirely sure how the business model works here, but the CD-keys are likely a matter of bookkeeping, and that is very important. Steam sells products for other publishers. They need to be able to keep track of all that meticulously, or else the publisher will not do business with them. The CD-Keys are likely the easiest way to do this.
EA gives a bunch of CD-Keys to Steam. They track the keys, and when they are activated, they send Steam a bill. Again, I'm speculating here, but I imagine it works something like that.
I'd go as far as assume that Steam orders a certain amount of CD keys from publishers, based on their projected sales, at more or less regular intervals.
Obviously, they don't need to do this for Valve games, due to the process either being automated, unnecessary due to advanced Steamworks integration or just way easier when you're moving stuff from one hand to the other.