We use "The" where the name refers to an area that is a collection of some kind, or a structure of some kind. What do I mean by this?
I lived in China vs The People's Republic of China
I lived in America vs The United States of America
There are some notable exceptions such as The Netherlands, which is because it refers to the Kingdom of the Netherlands. You'll notice that other countries don't follow this though. It's mostly a matter of convention, which will change over time, as it has with The Ukraine, which no longer uses the article.
Unfortunately, these countries just have to be learnt individually.