As part of the Android's open source Apache license, manufacturers are required to publicly release all of their own modifications and improvements made to the Android core. Today, both Samsung and Motorola decided it would be the perfect time to drop the Captivate and Droid X code to their respective open source sites.
This will allow ROM developers to figure out all those little quirks specific to the hardware and incorporate them into their releases.
Note, however, that the Android license doesn't cover proprietary extensions, such as custom vendor applications and widgets, and therefore does not require manufacturers to open source them:
With the exception of brief update periods, Android has been available as open source since 21 October 2008. Google opened the entire source code (including network and telephony stacks) under an Apache License.
With the Apache License, vendors can add proprietary extensions without submitting those back to the open source community.
You can find the Droid X open source code right here.
You can find the Captivate open source code here (search for SGH-I897).