here's a well-known and important programming problem...triangle intersection.
The question is written as a math problem, not in terms of programming. If it's written for programmers, then it should be presented to programming experts. If it's written for mathematicians, then it should be presented to math experts.
The questions you are using as examples could have been about programming, but they weren't. They were about math, and you could answer them completely without writing code, further they weren't asking for software examples, nor did they show any code demonstrating a problem.
When a problem can be equally solved by two sites on stack exchange, the user should carefully consider what they want the answers to look like. If they want programming answers, they should ask their questions in terms of programming. If they want mathematical answers, they should write their questions in terms of math.
Writing for one crowd, and submitting to the other is bad because we want to attract and keep experts in each field on the site.
Questions that are off topic - even merely in the way they are written - are noise for those experts.
It's not a bad question. It's not a question we can't answer.
But it's not the right place for it OR it's not the right format for the question.
When you feel strongly about such a question, edit it so it specifically relates to programming, or flag it so a moderator moves it to the correct site.
It's important to note that it would have been on topic prior to the creation of math.stackexchange. There is an obvious overlap between the communities, but when you ask an expert for help, you don't simply barge into the expert who's help you want, and present your question in the wrong terms. You make it as easy for them to understand as you can, and you do it within their field of expertise.
While you can go to both a llama expert and a sheep expert and discuss sheering, you should choose the one that will most closely match your needs, and then you shouldn't waste their time or bore them by talking about it in terms of the other field.
Yes, they are similar, but you are asking someone for help. Go to the right person, use the right terminology for their field, and make it easy for them to give you the answer you need.
Otherwise you will eventually make them tired of people asking them questions about a subject they may know about, but they don't care to discuss. They're here to answer a specific type of question, and if we don't keep the site on topic, they're going to get tired of the noise.