These are the only ways your dilema could have happened:
- You hacked your game, causing this.
- There was a glitch and this was the consequence.
- You forgot to save after migration and trade.
- You thought you had them, but actually didn't.
Seriously, the last one happened to me. I thought I had a Feraligatr in Heart Gold, but it turned out (after months of searching) that I didn't actually have one and that it was in my Black version, not my Heart Gold.