Gmail same thread response!

I was looking for a solution to reply to a gmail email and accidentally I put RE behind the Subject. And to my surprise, it joined the incoming email. Can anybody explain this? I have not experimented more but what if two subject are the same. I don’t understand how Gmail process it.

Here is another thread related: