I have done an apprenticeship as a software developer in Germany myself many years ago, and I have been the Ausbilder in two companies. Many of my friends have also done various tech apprenticeships (both Fachinformatiker and IT-System*).
There is absolutely no reason for you to feel guilty about leaving after your apprenticeship ends. There is no need for you to stay. Many companies use the apprenticeship as a means to get people long-term. We certainly did because we worked with a very rare technology that was hard to hire for. But not everyone stayed. We had people leave for different reasons. Those included them wanting to go to university, moving away, wanting to freelance or being not as good as we'd hoped and it was mutually agreed they wouldn't stay.
You don't have to justify anything. Your contract ends when you pass the oral exam. That day you are free. If you don't sign a new one, you don't need to go back. That would be burning bridges of course, so you want to be diplomatic about it. But you have no obligation to accept any offer.
My suggestion would be to ask them early what they think. Ask for the terms they will offer for staying on. Salary, holiday, the usual. Take it home, take some time, then politely decline. Thank them for the time and tell them you've decided to move on. You don't need to say why. If they then start to make your life hell, you just have confirmation that you've made the right decision. I will get back to solutions to that further down.
If you're in year three now, then you'll probably have given the written exam already. Start looking for new positions now. You've got the first two school years worth of Zeugnisse, if those are good you can use them as an estimate for your result.
If you still have half a year or a full year to go, you should bite through. Legally there are only a few ways to leave early, and they don't include not liking the company to finish somewhere else unfortunately, unless you can convince them to make an Aufhebungsvertrag to mutually end the contract.
Here's the relevant passage of the BBiG.
§ 22 Kündigung
(1) Während der Probezeit kann das
Berufsausbildungsverhältnis jederzeit ohne Einhalten einer
Kündigungsfrist gekündigt werden.
(2) Nach der Probezeit kann das
Berufsausbildungsverhältnis nur gekündigt werden
1. aus einem wichtigen Grund ohne Einhalten einer Kündigungsfrist,
2. von Auszubildenden mit einer Kündigungsfrist von vier Wochen, wenn sie die Berufsausbildung aufgeben oder sich für eine andere
Berufstätigkeit ausbilden lassen wollen.
(3) Die Kündigung muss
schriftlich und in den Fällen des Absatzes 2 unter Angabe der
Kündigungsgründe erfolgen.
(4) Eine Kündigung aus einem wichtigen
Grund ist unwirksam, wenn die ihr zugrunde liegenden Tatsachen dem zur
Kündigung Berechtigten länger als zwei Wochen bekannt sind. Ist ein
vorgesehenes Güteverfahren vor einer außergerichtlichen Stelle
eingeleitet, so wird bis zu dessen Beendigung der Lauf dieser Frist
gehemmt.
The gist of this is that you can only leave for a "good reason". That typically means one of these (I am not being sarcastic here, this is the list I learned in my trainer training).
- The company moves away and you cannot follow to another city
- Your parents move away and you have to go with them
- The company shuts because the owner dies or falls seriously ill
- You die or fall seriously ill
- You decide to stop the training and take up a completely different job
- You decide to stop the training and stop working altogether
Note that working for a different company in the same job is not part of that.
Should it be really bad, and you feel you cannot go to work at all any more, there are different options. For immediate help, go and see your Hausarzt (GP doctor). Tell them how stressed you are. Put everything on the table. Get a sick note for a week or two. Burnout and mental illness are real. Paid sick leave is normal in Germany, and the sick note does not reveal the reason for your absence. Be professional about it, inform work according to the process and send in the yellow paper.
If that doesn't help, talk to IHK. They have people to support the apprentices. If there is conflict, they can help resolve it. They will be able to find you a different company to finish your training, and they have very good options to coercing your current one into letting you go (as in, revoke their training licence).
As to your CV and interviews, there are several simple explanations. In fact, lots of large companies such as Deutsche Telekom do not keep all of their trainees. When my friends were there, they had a lottery and several of the really excelling trainees were not kept around.
You will want to use a neutral tone to explain why you didn't stay. Don't lie, but don't give too many details either.
- You weren't offered a contract (could be all kinds of reasons, e.g. financial situation of the company; doesn't mean it's your fault)
- Their offer was not realistic (very normal, unfortunately; many companies think they can have their trainees for cheap once they're done)
- You feel didn't really learn anything new there and want a fresh challenge
- You didn't like the culture, but sat it out to get your degree (shows you're professional and have grit to see things through)