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
One answer may be that this sequence better emphasizes God's compassion - despite already being 'convicted', God still forgives.
Another reason I heard from Rabbi Dovid Orlofsky is that this is meant to teach us that God the ideal is for us to be tzaddikim, to measure up to justice. This is meant to teach us that god thinks that we are really capable of doing much better, that we have the potential, despite being human, of measuring up to din.
Why do you think that you are judged Rosh Hashanah, without an opportunity to do teshuva? The judgement does not come until the books are closed and the (days of awe) concluded although…
One may assume that the month of Elul being the sixth month, is like unto the sixth day, a day of preparation in anticipation for the shabbat, the seventh day, where no further work can be done. The month of Elul is used fervently to put right, things that are yet outstanding, for example (payment of vows) etc. Trumpets are blown, every day during this time, remind the people that the time of judgement approaches. The custom of Tashlic, of the casting lumps of leaven is reminiscent of an earlier practise where instead of bread, people would cast themselves into a source of clean, running water as an effective way to remove certain forms of uncleanness.
This concern over the seventh month of judgment culminates with Atonement day, where crimes or sins against G-d and against the holy things were given hearing and judged accordingly. After this business was concluded, offerings were made, if they had judged swiftly and removed what which was evil out out of the land of the living, then the anger of the wrath of G-d would not be stoked against his people. Meanwhile the people would wait for a sign, from the house that their actions, atonements and offerings had indeed been accepted, this was symbolised by a scarlet thread, miraculously turning from red to white, symbolising their forgiveness. The seventh month liturgy is all about crimes against G-d but other cases of law would be of concern to the ordinary G-d fearing man, in that he should give no individual an opportunity to bring a case of law against him at this time. Usually only serious cases, which the local judges could not deal with were held back for the three holy convocations in a year.
Interestingly, there does appear to be events recorded in scripture where for example, the story of Jonah and the whale, alludes to him being sought out as a witness against Nineveh and where he was to, 'call out against them', their great sin, but he was afeared for his life and ran away from his allotted duty. This shows that in some cases of judgement where judgement, like the judgement of Sodom and Gomorra is extended outside of the confines of Israel and which really did extend and concern the nations living in amongst them. So during this time, the arm of the Lord, was long indeed and could fetch a man from distant corners, that he be judged. Likewise the judgment of cities, came with much deliberation, and early warning for them to return warning before a final judgement would be met against it.
So to conclude, some people are certainly judged for Rosh Hashanah, for without this judgement, all the business of Atonement Day would not be concluded, but this is not without the opportunity to do teshuva and even with teshuva it does not mean you would be free of punishment. So during this one long week or ten days all business must be concluded in time for Atonement Day, all offerings made, all punishments carried out, in order to learn by the miraculous cord of scarlet, whether the sins of the people have been forgiven. We hear this in (Isaiah 1:18-19). Although your sins be as scarlet they will be as white as snow… We have the opportunity to teshuva from the 1st to 7th month, we have a week of months to put right our business, to learn to do good; seek justice, reprove the ruthless, defend the orphan, plead for the widow and to accept the sovereignty of G-d and cause the blessing and not the curse to rest upon us.