Why do Bundeswehr soldiers wear their uniforms on trains?

Why they take the train is more or less obvious. They probably get to ride free so it's a great way to go between their base and home.

Is it required by protocol? Do they need their uniform to ride?