There are strange situations where you really do want to connect RX->RX and TX->TX e.g. with an Arduino. Because the labels on the ports are for 99.999% of normal use cases and not for how the hardware can really be used if you are actually thinking totally outside the box. And misleading labelling would add an extra layer of confusion to the confusion!
Here is the comment from the very strange source code which makes you wonder what is going on, what they are doing looks really stupid, but is the total opposite:
It is a neat trick. The summary would be: Arduino your task is to ignore everything, do absolutely nothing at all. I’m just going to borrow this built-in USB to UART that is normally used to program you, or watch output from your UART, to debug some other hardware.