First: it's really hard to get fired in germany, almost impossible.
Second: they help formulate who gets laid off when, when there are layoffs, and prioritise people who can and will find a job more easily. So young people and people without families. This is because older people are more vulnerable to discrimination.
This is what a society does to protect each other and to use power against a company because the employer-employee relationship is adversarial. Unions don't exist to protect the brass, i don't even know what you're on about