To elaborate on ratchet freak's answer; CD-ROMs work by sensing the intensity of the light reflected from the CD as it is spinning. More light being reflected stands for a 1 and less light being reflected stands for a 0 (or vice versa). One way to encode the information would be to have highly reflective surfaces for the 1's and dark patches for the 0's. Printing dark patches at the size of the laser spot size is actually used in writable CDs, but the technique suffers from degradation over time.
Instead commercial CDs rely on the property of interference to create dark patches. When the laser beam is in the transition region from land to pit, part of the laser beam reflects from the land and part from the pit. The depth of the pit is roughly 1/4 of a wavelength such that the portion of the beam which reflects from the pit has picked up an extra $\lambda/2$ of phase. This phase shift causes the beam falling on the photodetector to appear dark due to destructive interference.
The system used to detect this induced intensity modulation is a very simple one. It essentially consists of shining a laser at the disk and putting a photodiode on the reflected beam. Actually detecting the depth of the pits would require an interferometer which is significantly more complicated. This is because the interferometer would need a reference mirror whose position was stable to significantly better than the depth of the pits, ~250 nm. This is a difficult task to achieve inside of a disc drive which has a bunch of moving components (such as a disc spinning at 500 RPM) and may even be mounted in a vehicle which is moving and shaking around.