Q: What has precedence? Close or migrate? In the last few weeks I have flagged a number of questions as Off Topic and recommended migration to Super User. Most of these questions were closed, though, not migrated.
Can somebody help me understand that rationale? If a question is flagged, does it not attract moderator attention? If it doesn't, what is the use of flagging?
Does a migrate flag by a knowledgeable expert get superseded by a 5 x close vote of members who don't understand what the question is about?
Is the question better off being closed here at Stack Overflow rather than being migrated to Super User, where it might spark more expert attention in a setting with experts who actually understand what the question is about?
I find it rather short-sighted to close a question, just because it does not belong here, ESPECIALLY if the question has already been flagged for migration. 
Why are questions that are flagged for migration not just migrated as per the recommendation of the experts who understand the topic? Why can members who clearly don't understand the topic overrule the migrate flag and have the question closed? If the folks who voted to close had any understanding of the topic they would have flagged for migration. If they don't understand the topic, then they should not vote.
I feel that a migration request flag should supersede a "me too" close flag, especially if the migration flag came first.

A: When the community closes with five votes, this will dismiss the flag as helpful and no moderator will ever see it. That is one possible reasons why the question was not migrated. This behaviour of the flag system has been critizized and is likely to change in the future. For now, if you're convinced that the question is good and you are sure it is on-topic on the target site, flag it again for migration after it was closed (unless your flag was declined, that means a mod saw it).
Questions older than 60 days can't be migrated. And in general, only reasonably good questions are migrated as a matter of policy. No sense in shuffling bad content around the network. Especially questions that are not constructive or NaRQ are in almost all cases closeworthy on the target site as well.
Personally, as a moderator I don't act on a rather large percentage of migration flags due to the reasons I listed above. 

A: Migration. But only on questions where it applies.
If the question is bad, migration isn't a "better way" to do it. It's the wrong thing to do. I've seen a lot of users wrongly migrate stuff because they felt that closing was a crueller fate.
To be clear, migrate only when:


*

*The question is off topic for your site, on topic elsewhere, and doesn't have any other problems. It shouldn't be a bad question.

*or when the OP asks for it and it's on topic on the destination site



And mods have a lot more flags to tend to, 
That being said, this probably had to do with the auto dismissal of the flag. The flag system is being revamped, so this will probably get fixed then. In the meantime, I suggest you re-flag the question with a custom flag asking for migration.

Why can members who clearly don't understand the topic overrule the migrate flag and have the question closed?

Only moderators can see the flag when visiting the question. 10k users can see it in the 10k queues, but not in an overlay. 
So I guess that the members didn't know there was a flag.

A few more caveats:
A lot of users who are question banned post on other sites. If their question is migrated to their original site, the migration is auto-rejected.
From what I've seen, most of the questions that get asked on the wrong site are terrible. Not saying that being asked on the wrong site automatically makes it terrible, but it's quite common.
