The people asking those questions are often not developers/engineers, but are also not idiots. They have chosen Stack Overflow knowingly, because there was no better community.
And yet, they choose the wrong community.
Both of the question you cite in that paragraph are very clearly white-board questions. They're theory questions, not specific ones. These sorts of things are best asked on Software Engineering.
This brings me to my last point. Almost all research nowadays makes use of software/programming tools, but most researchers in those domains have very domain specific knowledge, and their understanding of, for example, compilation and multi-threading is extremely basic. It is natural that their questions seem poorly worded, too broad, off-topic to seasoned software engineers.
So, what exactly are you asking? That we should make exceptions for bad questions asked by people from certain backgrounds? After all, you're not claiming that these questions won't actually be "poorly worded" et. al. You're just claiming that we ought to accept such questions from them.
I don't have a problem with new users or experienced engineers. I have a problem with bad questions, regardless of who they come from.
As a second example, one of my old questions about torch7/C++ integration was closed as off-topic. I don't mind it, since I had found the solution myself. But, as you'll notice, most of the users who voted to close don't have any torch or even LUA tags. From the reasons they give, it seems that none of them really understands the question, although there were appropriate and helpful answers.
It's important to understand why this question was (mistakenly) closed. It was closed specifically as if you were asking for a tool. You weren't, but the lack of details (and a code example) in your question made it seem like you were asking for a library to convert LuaJIT cdata objects into Lua user-data objects. Furthermore, adding details to that question (like the fact that the cdata came from Torch specifically) would have been very useful for the people seeking to answer it.
Now as previously stated, closing that question was a mistake. But we can always do things to make it more difficult for such mistakes to happen. That certainly does not require any radical changing to how question closing works.
why do people with no relevant expertise have the right to close/migrate questions they know nothing about.
Because in most cases, what matters is knowledge and understanding of our rules, not domain expertise of the question itself.
If a question is asking for a library to solve problem X, the reader does not have to know anything about problem X to know that we don't allow questions asking for libraries. You don't have to know one thing about OpenGL, C++ or C# to know that this question is too broad for SO. And so on.
In the vast majority of cases, domain expertise is irrelevant to determining the appropriateness of a question.
Do we still occasionally get things wrong? Sure. But more often than not, we're right. And you can always plead your case in comments/clarify the question to get it re-opened; closing is not permanent.