While this isn't official behaviour (since there's no official way to transfer saves from one version to another), it is known behavior for paired games. I won't go so far to call it a "glitch".
Presumably, this happens because paired games were in development at the same time, so it's essentially just the one same game instead of two different games; all they did was flip a few flags to make certain mons appear differently, aka version exclusives. Since they are one same game, their save recognition system also works the same way, hence: if you were to bring a save over from another game of the same pair, it can be read.
While future games (3DS titles, Switch titles) might softlock the game if you do this kind of swap and try to progress the story (because more than just encounter flags get flipped, and more complicated than just simple flipping; they actually programmed in both sets of dialogue, both sets of "version exclusive" NPC interactions, both sets of in-game triggers etc), the same phenomenon you observed still occurs with non-story related version exclusive encounters.
It is also possible older games have certain elements in the story that can cause soft-locks (when save swapped), but it has to be documented.
I've did it with a few games but did not notice anything untoward happening.