How does gromacs calculate RMSD for proteins?

GROMACS version:
GROMACS modification: Yes/No
Here post your question
Dear All,
I have come across something strange while doing RMSD calculation.
I calculated the RMSD of a mutated protein using the .tpr file generated from Wild type and it does the calculation without any error. Both the systems have different number of atoms and I was anticipating an error, but that didnt happen. Infact, I tried the calculation using totally unrelated .tpr from a different protein and yet it prints some values.
Now I’m totally confused about whats happening. I tried the calculation using two versions of gromacs:2020.2 and 2022 as well.
Can anyone explain what might have gone wrong here ? Or am I making some mistake in understanding.
Thanks and Regards