There is a small sub-set of countries which, for obscure historical reasons, use the definite article in their English-language name: The Lebanon, the Sudan, the Netherlands, and the Ukraine.
I, too, grew up using the definite article when speaking about Ukraine. I am now trying to wean myself off using it, since (apparently) at least some Ukrainians find it slightly derogatory.
(There are no definite articles in the Ukrainian language, so their own name for their own country in their own language does not have the article.)
You'll find all kinds of curious demonyms used in various different languages for other peoples: "Haoli" is Hawaiian for "without breath," but was used to describe Europeans (b/c Europeans kept their distances, did not hug - thus creating the impression that they had no breath). "Nemtsi" (literally: "mutes") is the Russian word for Germans, since they apparently couldn't speak at all. Etc.
Does that answer your question?
Regards,
I had thought it might refer to geographical reference. For example, I grew up in “the south” and here I live in the Piedmont, so that was my best guess, but I never really knew.