Why does GitLab adds line breaks to a runner's output?

I noticed that a runner’s output has too much space between each line, and when I inspected the HTML, I realized that GitLab was actually adding “<br>” tags between each line sent to its output.

Given that the output is already inside a <code> tag, is it really necessary to keep those extra linebreaks?