Roughly speaking, this is as designed. It's part of our "simplification" code for translating input from the RTE. There are many cases where the HTML output by the RTE is overly complex, so we do some combining of adjacent BB code if they're doing the same thing and the result would generally not be significantly different.
Note that this only applies to a case where you have text on adjacent lines linking to the exact same URL with nothing between them. It basically becomes ambiguous (from the RTE HTML) as to whether that was 1 link split up to multiple for technical reasons or 2 distinct links. The code that does this has been in place since 2013 so it's unlikely to be something that has come up particularly often.