Every country (and a few territories) in the world has a reserved, two letter country code domain that is theirs to use as they see fit. Some countries run their own ccTLD registry, others outsource it to a private company, and still others sell rights to their ccTLD to third parties to run as they see fit.
Examples of ccTLDs are .ca (Canada), .us (United States), and .to (Tonga). In general, these are registered by businesses with a coincidental link to the TLD in question.
For example: .to is used more by Torontonians than Tongans and .tv has more American television content than native Tuvalu culture.