The primary purpose of flanges are to serve as a bolted connection between two pie systems. This connections is critical in order for gas, steam,water or other liquids to flow continuously.
To learn more about flanges, check out the links below:
http://www.coastalflange.com/pipeflanges.html
http://www.coastalflange.com/customflanges.html