It's part of their brand, they also call is Verkehrsrot (roughly "transport red"). Private railways use different colors.
The reason of the design is unknown. Maybe they wanted their trains to be noticeable easier or something like that.
>>1519872The whole railway system of UK became a large shithole after the privatization mania. It's a perfect example what happens when they let out public transport to the free market. Servicing people between distant points shouldn't be a question of market, at least in the field of public transport.
Staying at the UK trains: unlike every other features, the yellow color on the front was exclusively functional (and of course, obligatory): its function was to notice the approaching train from a longer distance. Similar systems existed in Poland and Hungary,