The main purpose of this legislation is to protect certain rivers and streams in the Greater Yellowstone Ecosystem in Montana by designating them as part of the Wild and Scenic Rivers System. This designation aims to preserve the natural beauty, ecological health, and recreational opportunities these waterways provide for both current and future generations. Key provisions of the legislation include the designation of specific river segments, such as parts of the Madison River, Gallatin River, and Hyalite Creek, as scenic or recreational rivers.