Since the 19th century Chicago has been the hub of the North American rail network. It has more trackage radiating in more directions than any other city in North America. Railroads set up their headquarters in the city and Chicago became a center for building freight cars, passenger cars and diesel locomotives.
By the 1930s Chicago had the world's largest public transportation system, but commuter rail services started to decline. By the mid-1970s, the commuter lines faced an uncertain future. The Burlington Northern, Milwaukee Road, Chicago and North Western, and Illinois Central were losing money and railroads were using passenger cars from as far back as the 1920s.
Formation of the RTA..... To provide stability to the commuter rail system, the Illinois General Assembly formed the Regional Transportation Authority in 1974. Its purpose was to fund and plan the Chicago region's public transportation. In the beginning the Regional Transportation Authority commuter train fleet consisted of second-hand equipment, until 1976 when the first order of new EMD F40PH locomotives arrived. That F40PH fleet is still in service today.
Less than a decade later the Regional Transportation Authority was already suffering from ongoing financial problems. In 1983 the Illinois Legislature reorganized the agency. That reorganization left the Regional Transportation Authority in charge of day to day operations of all bus, heavy rail and commuter rail services throughout the Chicago metropolitan area. It was also responsible for directing fare and service levels, setting up budgets, finding sources for capital investment and planning.
Metra branding..... Due to the broad range of responsibilities entrusted with the Regional Transportation Authority, the Commuter Rail Service Board was created in 1984. It was renamed Metra in July 1985. The newly reorganized Metra service helped to bring a single identity to the many infrastructure components serviced by the Regional Transportation Authority's commuter rail system. Metra's operating arm, the Northeast Illinois Regional Commuter Railroad Corporation, was created as a separate rail subsidiary which operates seven Metra owned routes. Contracts were set up with the Union Pacific and Burlington Northern Santa Fe railroads to operate four other Metra routes. While Metra owns all rolling stock and is responsible for most stations on those routes, the freight carriers use their own employees and control the right-of-way for those routes. In keeping with Metra's purpose to provide a single identity for commuter rail in the region, the freight operators provide service under the Metra name.
More info can be found on the Wiki page here.