Let’s say someone stole or committed zina what is the point of stoning or lashing when the person can be taught and should turn in repentance. Stoning someone doesn’t even give them a chance to repent and is quite violent wouldn’t it be better to let the person repent and pay back through work or something?
The point is (a) expiation for the criminal's sin while in the dunya (any worldly punishment being better than punishment in Hell) and (b) acting as a strong deterrent, preventing others from doing the same in the future.
"can be taught"
In Islamic society where such punishments would be implemented, the atmosphere would be one of knowledge and dawah, whereby the message of Islam would reach the people daily. Mere children would be taught and would know right from wrong, let alone adults. Ignorance would not be an excuse.
"should turn in repentance"
Turning to Allah (ﷻ) in repentance is something easy that anyone can do at any time until the death rattle reaches the throat. The time leading up to someone's punishment being implemented is not something that happens in the blink of an eye, rather it's a process (e.g., case explained to judge, judgement, moments leading up to punishment, etc). At any time a person can repent to Allah (ﷻ) sincerely and be forgiven. But that doesn't change the fact that the punishment MUST be carried out once required conditions are met.
"is quite violent"
The intensity of the punishment is equity for the intensity of the crime. Did Allah(ﷻ) prescribe any major punishments for lesser sins (lying, masturbation, etc)? No. Major punishments were prescribed for major actions that cause trouble, chaos and distress in society. Stopping these troubles is not as easy as "let them repent and pay back though work". Plus, consider the alternative: If there were no major punishments for sins, then sinners could just keep on sinning with the expectation that they will be let off easily. This enables crime to continue. The Islamic justice system is perfect, Alhamdulillah.