AT first glance it would make more sense to be given a chance to do teshuva before being judged, so why is it the other way around?
Rav Yisroel Salanter asked this. His answer was that the purification of Yom Kippur is only a result of a long process of altering the way a person is in the very depth of his being.
This process starts with realization of the correct system of priorities, the main one being the Kingship of G-d over the Creation. Hence, Rosh haShana is a critical beginning point of a process, which alters us deeply and so can culminate in the cleansing of Yom Kippur.
More details, for example, here: http://www.arachimusa.org/Index.asp?ArticleID=1066&CategoryID=140&Page=2