this part of a domain name is called toplevel domain. toplevel domains were choosen to classify a domain name. to mention some:
then a toplevel for the most countries exist, like .de (germany), .uk (united kingdom), .ag (argentinia), .tv (a small island state which is now under the sea-level) etc. . some countries even add a sublevel domain to the toplevel part at the end, like .co.jp for commercial sites in japan.