DVD codes were put in place in an effort to control the release of DVD content on a regional basis. DVDs released in one region will not play elsewhere.
i assume you mean region codes, 0 is worldwide, 1 is US/canada/bermuda, 2 Europe (except Russia, Ukraine, and Belarus), Middle East, Egypt, Japan, South Africa, Swaziland, Lesotho, French overseas territories
They allow you to play dvd's made for your region in the world. It has different screen formats designed for different televisons and languages. It also helps with bootlegging in foreign countries.