I understand that the Torah orders that at the time that a Nazir finishes his year he is required to bring a Korban Chatas. I'm finding it difficult to understand this. First of all what issur did the Nazir do? The Nazir did a mitzvah by taking upon himself the nazirite oath. And secondly even if you want to find a way to say that the Nazir needs atonement, a Korban Chatas is only for someone that sins by accident, an example would be if a person forgot it was the sabbath and did one of the 39 biblical sabbath prohibitions by accident. However in this case, the Nazir knowingly and willfully takes upon himself the nazirite oath. So why does he bring a Chatas?
The Ramban (Numbers 6:14) writes that the Nazir is sinning by leaving his elevated state, i.e. the sacrifice is for ending the state of being a Nazir.
על דרך הפשט, כי האיש הזה חוטא נפשו במלאת הנזירות, כי הוא עתה נזור מקדושתו ועבודת השם, וראוי היה לו שיזיר לעולם ויעמוד כל ימיו נזיר וקדוש לאלקיו
The Rambam sees in the Nazir support for his approach that a person should not go to extremes. Shemoneh Perakim ch. 4:
וְאָמְנָם כִּוְנָה לִהְיוֹת הָאָדָם טִבְעִי הוֹלֵךְ בַּדֶּרֶךְ הָאֶמְצָעִי: יאֹכַל מַהשֶּׁיֵּשׁ לוֹ לֶאֱכֹל - בְּשִׁוּוּי, וְיִשְׁתֶּה מַהשֶּׁיֵּשׁ לוֹ לִשְׁתּוֹת - בְּשִׁוּוּי, וְיִבְעַל מַהשֶּׁמֻתָּר לוֹ לִבְעֹל - בְּשִׁוּוּי, וְיִשְׁכֹּן בַּמְּדִינוֹת בְּיֹּשֶׁר וּבֶאֱמוּנָה; לֹא שֶׁיִּשְׁכֹּן בְּמִדְבָּרִיּוֹת וּבֶהָרִים, וְלֹא שֶׁיִּלְבַּשׁ הַצֶּמֶר וְהַשֵּׂעָר, וְלֹא שֶׁיְּעַנֶּה גוּפוֹ. וְהִזְהִירָה מִזֶּה, לְפִי מַה שֶּׁבָּא בְקַבָּלָה. נֶאֱמַר בְּנָזִיר: "וְכִפֶּר עָלָיו מֵאֲשֶׁר חָטָא עַל הַנָּפֶשׁ" (במדבר ו יא). וְאָמְרוּ רַבּוֹתֵינוּ, זִכְרוֹנָם לִבְרָכָה: "וְכִי עַל אֵיזֶה נֶפֶשׁ חָטָא זֶה? - אֶלָּא עַל שֶׁצִּעֵר עַצְמוֹ מִן הַיָּיִן. וַהֲלֹא דְבָרִים קַלוָחֹמֶר: מַהזֶּה שֶׁצִּעֵר עַצְמוֹ מִן הַיָּיִן - צָרִיךְ כַּפָּרָה, הַמְצַעֵר עַצְמוֹ מִכָּל דָּבָר וְדָבָר עַל אַחַת כַּמָּה וְכַמָּה" (תענית יא א) א.
(paraphrased) A person should go on the middle path, eat, drink, etc. with a balance, and don't afflict one's self. This is seen from the Nazir, about which the Sages said "Upon what soul did he sin? Rather, he afflicted himself by abstaining from wine.
In answer to your second question, accidental sin (שוגג) is not the only case of a Chatas. For example, a woman brings a Chatas after she gives birth (Vayikra 12:6).
וּבִמְלֹאת יְמֵי טָהֳרָהּ, לְבֵן אוֹ לְבַת, תָּבִיא כֶּבֶשׂ בֶּן-שְׁנָתוֹ לְעֹלָה וּבֶן-יוֹנָה אוֹ-תֹר לְחַטָּאת
Rashi to Bereishis 31:39 relates the word חטא to חסרון, a lack, as in the verse קולע אבן אל השערה ולא יחטיא (Shoftim 20:16).
אנכי אחטנה: לשון (שופטים כ טז) קולע באבן אל השערה ולא יחטיא, (מ"א א כא) אני ובני שלמה חטאים, חסרים, אנכי אחסרנה, אם חסרה חסרה לי, שמידי תבקשנה
Nefesh HaChaim in 1:6 says the same thing.
כי חטא פי' חסרון כידוע.
The Nazir creates a void in his closeness to Hashem by going down, and the woman has a void in her spiritual state with the loss of life from within her, and they bring a Chatas to rectify the void.
Alternatively (based on the verse from Shoftim), חטא could mean being off-target, or veering off. The Nazir brings a Chatas for veering off of the spiritual path that he is on. According to the Rambam, this could be understood as having veered off of the middle path.
Wikipedia seems to have done a good job (my emphasis)
Attitudes toward Nazirites The nazirite is called "holy unto the Lord" (Numbers 6:8), but at the same time must bring a sin-offering (Numbers 6:11) and his sins are explicitly referred to ("and make atonement for that which he sinned"). This apparent contradiction, pointed out in the Babylonian Talmud, led to two divergent views. Samuel and Rabbi Eliezer Hakappar, focusing on the sin-offering of the nazirite, regarded nazirites, as well as anyone who fasted when not obligated to or took any vow whatsoever, as a sinner.
(The Gemara, Taanis 11a, says, אמר שמואל כל היושב בתענית נקרא חוטא סבר כי האי תנא דתניא ר' אלעזר הקפר ברבי אומר מה תלמוד לומר וכפר עליו מאשר חטא על הנפש וכי באיזה נפש חטא . זה אלא שציער עצמו מן היין The possuk in bold is Bamidbor 6 (7) about the nozir.)
A different Rabbi Eliezer argues that the nazirite is indeed holy and the sin referred to in the verse applies only to a nazirite who became ritually defiled.
Simeon the Just (a High Priest) was opposed to the nazirite vow and ate of the sacrifice offered by a nazirite on only a single occasion. Once a youth with flowing hair came to him and wished to have his head shorn. When asked his motive, the youth replied that he had seen his own face reflected in a spring and it had pleased him so that he feared lest his beauty might become an idol to him. He therefore wished to offer up his hair to God, and Simeon then partook of the sin-offering which he brought.
I think that there are two general approached to why the Nazir brings a chatas upon completion of his nezirus:
One opinion in the Gemara (Taanis 11a), R. Elazar Hakapr, does state that the nazir is regarded as a sinner and brings a sacrifice to atone for his sin. The gemara states that the nazir's sin is that 'he abstained from wine', an opinion taken up by the Rambam (Shemoneh Perakim ch. 4 and Hil. Deos 3:1). The Ramban (to Bamidbar 6:14), however, believes that his sin is the opposite - he was on such a lofty level before, and now he is returning to a less elevated state. According to both of these opinions, it's easy to see that while the 'sin' isn't accidental, it isn't technically a sin either - according to the Ramban, the 'sin' is just being normal. In terms of severity level, it makes sense that such a 'sinner' is like one who does so accidently. (I should add that, actually, the korban chatas isn't exclusively for sinning accidentally. See Keriesus 9a which gives a list for the korbanos that are brought for sinning even intentionally.)
It could be, however, that a korban chatas is not always brought for a sin, but for other reasons as well. (I'll suggest two possibilities, but there are more)
A] R. Hirsch suggests that the Chatas is brought not for a past sin, but as a way of strengthening the nazir's resolve to never sin again, even after he returns to normal life. The nazir, according to R. Hirsch, is not meant to be a permanent status but a means of re'acclimating oneself to identify with the lofty goals of the Jewish people, with the ultimate objective of being able to join the rest of them.
B] 'Chatas' may mean something other than 'sin'. In the context of the Red Heifer (Bamidbar 19:9), the word 'chatas' unambiguously refers to purification. Likewise, the woman who gives birth, as well as the zav and metzora, are required to bring sacrifices before they can partake in eating kodshim, and one of those sacrifices is a 'chatas'. Based on this, it appears that a chatas is brought for purification. Even though the nazir isn't being purified, this idea can be broadened to say that a chatas is brought whenever a person is changing their status to a more permanent one, purification being one example. Support for this idea can be seen from the fact that the kohanim, at their time of their initiation ceremony, brought korbanos chatas (Vayikra 9:2 among other places). Similarly, the nazir brings an 'initiation sacrifice' to bring him back to the rest of the people.
Maalim BeKodesh, ve Lo Moridim. We always strive upwards in holiness, and not to decline. the Nazir is compared to be at the level of holiness of a Kohen Gadol, wherein Kohen Gadol is holy because of the oil of anointment, which is external to his body, the nazir holiness grows out of his body (internal), Ki Nezer Elokav Al Rosho his hair. (Rabinu Behaye, Alshich, Ramak). Since he chose to descend and stop dwelling in such high holiness, ie. the termination of his nazirut, he is considered a Chote (transgressor), and therefore he has to bring a korban hataat.