Due to the way QR codes are generated, if you have the same layout in the same base in both your games along with the same IGN, then the codes will be identical.
Since you don't have to be online to use QR codes it won't be because they are registered on the same console as there isn't any interact between the consoles once the code is scanned, i.e. It's standalone not server based.
Another explanation could be that they are not the same but look very similar, again, due to how they are created and them being for the same purpose in this case, a large amount of the code could be identical with only a few parts changing.