Why is the Depth of Field Preview button necessary?
With the lens wide open, as it normally is before you take the shot, you can't tell how much depth of field you'll get in the photograph. When you press the button, the lens is stopped down to the selected aperture letting you see the shot as it will be recorded, depth of field and all.
For both digital and film cameras, keeping the aperture wide open until the shutter is tripped allows maximum brightness in the viewfinder, which you normally want. It also allows enough light for autofocus systems, which often need an aperture of at least f/4 or even f/2.8 to function correctly. Older cameras that lack autofocus generally have some other focusing aid, such as a split prism and/or microprism ring, and these also work better at wider apertures.
I know some older cameras and lenses used to have aperture rings on them, which allowed the user to set how open or closed the aperture is at any given moment.
That's not really true, or at least it's not right for any of the SLR systems I know of. Many (if not most) older SLR's also had a depth of field preview button. You're right that they had an aperture ring to select the aperture, but the iris didn't close to the selected aperture until you pressed the shutter release button.
For example, I have an Olympus OM-1, and the lenses for that camera all have DOF preview buttons on the lens itself. Most of the SLR systems I can think of had a similar button or lever, although it was often located on the body rather than the lens. The main exception (in my memory) is the Pentax K1000, which lacked the DOF preview button, but still didn't stop down the lens until the shutter was triggered.