The Wehrmacht called that "Strafbataillon".
It has the same name in Russia. It is a final chance to wash the shame off your hands before the Motherland, with your own blood
ukrainian frontlines are seen and treated as a punishment
And this is rifghtfully seen as a spit in the face of the soldiers that are there - it is true.
In Ukraine, "people" also write things like, "Before they mobilize another 500,000 of us - they should mobilize all the corrupt judges, prosecutors, cops, and taxmen." Alternatively, and even in even more absurd fashion, the so called "people" begin to say that first all the members of the Ukrainian parliament, all the ministers, and all their sons should be mobilized first.
From a political point of view - the problem is clear. People demand some kind of equity in mobilization. However, the sad fact of life is that mobilization usually falls on the shoulders of the poor.
However, treating the front as some kind of punishment is absolutely demoralizing to the men there. They don't want various junkies, alcolholics, corrupt bureaucrats and hooligans joining them in the trenches. They need people that are ready to shoulder the burden, and are not handicapped in any functional way.
The front is made up of the best people, and for "normal" people to talk about it like a punishment is certainly a great shame. The soldiers do not deserve this.