This was not a good candidate for migration. It is on-topic at Stack Overflow, and migration is intended for off-topic questions.
Perhaps the most compelling reason—while this question would fit very nicely on Code Review, it isn't necessarily off-topic on Stack Overflow.
This is a perfectly reasonable Stack Overflow question. OP was not asking us to look through a page of code for problems. OP was pointing out a specific issue and asking for advice. That is exactly what Stack Overflow is for. I got 11 upvotes asking a similar question (which, ironically enough, was itself migrated from Programmers.SE).
On the other hand, it seems more likely to me that the third possibility is correct. This raises the question: should I ever request migration to a site that might be a "better fit" if the question is on-topic on SO? I don't think it could hurt, but I'd understand if that were the policy.
Questions can be on-topic on multiple sites at once. In that case, it's up to the asker to choose a site. When you migrate a question, you are closing the original and creating a duplicate on a different site. If there's no valid reason to close the original, you shouldn't do that.