Depends on what the goals are. I don't think most counties want a large fraction of their population becoming mathematicians. They basically want most of their population able to use math not discover new areas.
What do you think it means to “use math”? If you want to train human spreadsheets you’re wasting everyone’s time: the spreadsheet already exists as a product for electronic computers, and is much faster and more reliable than a human will be at doing huge piles of arithmetic. (But anyway, even if you wanted to train expert performance at arithmetic, the way schools currently go about this is horribly inefficient and doesn’t take into consideration research on neuroscience / psychology.)
If you just want to train people to be unthinking drones who can follow narrowly specified procedural rules without understanding their context or meaning, then I guess the current system is a relative success.
In general, the point of mathematics education in primary/secondary school is not to train future mathematicians, but to teach people important problem-solving skills. The same skills are (to some extent anyway) useful in essentially any field you might name, from childcare to plumbing to legal analysis to fine art.
In particular: self-confidence that hard problems can be tackled and that anything one person can do another typically can also with training and effort, time management, lateral thinking, learning when to keep trying a strategy vs. when to switch and try something else, salvaging useful partial results from failed efforts, drawing diagrams, careful record-keeping of works in progress, more generally externalizing problem state so that it can be worked with outside your head, converting fuzzy problems into precise formal terms to they are amenable to careful logical analysis (including making explicit all of the assumptions involved in the model chosen), exploring the relationships between different problems, investigating specific concrete examples of general rules and generalizing from particular cases to abstract theorems, searching/skimming published literature for solutions to problems that are too much to handle or finding relative experts to ask for help and knowing how to do so productively, clearly explaining an original problem and its context and any simplifying assumptions and then clearly explaining a solution step by step, checking solutions by solving a problem multiple ways or doing quick sanity checks, .....
I could probably keep listing more here, but you get the idea. Anyone who plans to do any kind of real-world technical work will be at a huge advantage if they have significant amounts of problem-solving practice going back to childhood.
You might similarly protest that we should not bother reading and analyzing novels in school because few careers explicitly require reading/writing fiction, or that we should not bother with physical education courses because few careers require playing dodgeball, or that we should not bother with music courses because few careers require skill at playing the recorder, etc. etc.
There is a wold of difference between solving for X and proving P =/!= NP. Collage level math like DiffEq is still the kiddy pool with well known approaches that work.
Writing a new graphics engine, or baking a cake takes applying existing techniques, but not the fluid exploration of unsolved frontiers. So, when I say use math I mean take advantage of what exists not nessisarily add anything new.
So, yea we want problem solvers, but not thinkers.
Why do you think (paraphrased) “I think secondary school mathematics should focus on solving non-obvious problems” has anything to do with “proving P ≠ NP” per se? I’m obviously not suggesting that we should assign famous unsolved research problems to secondary students. I would instead hope we could assign students a variety of problems taking them between 10 minutes and a few weeks to solve (at their current level of skill), with emphasis placed on smart problem-solving efforts rather than on sorting students based on who gets the most right answers.
Most American undergraduate differential equations courses are taught as a list of recipes with little room for thought. Rather comparable to elementary school arithmetic drills frankly, though obviously involving more built up preparation. https://web.williams.edu/Mathematics/lg5/Rota.pdf
However, it is possible to assign difficult problems to students at any level from age 3 onward (see http://www.msri.org/people/staff/levy/files/MCL/Zvonkin.pdf for an example of real mathematics instruction for preschool students; for primary students look up the work of Dienes; at the middle school level I think some Russian programs are pretty good https://bookstore.ams.org/MAWRLD-7/ etc.). It just takes more work for teachers to provide feedback about student solutions to such problems, it’s less amenable to grading by rote (and therefore not easy to check via standardized tests), and it takes more significant focus/attention/decisionmaking by teachers from moment to moment (and ideally more teacher background preparation). The students learn the subject more deeply, enjoy the process more, and learn significantly more transferrable skills.
Porting a graphics engine from one platform to another very similar platform (after having ported many other software projects between the same pair of platforms) or baking a cake just like all the others you have baked before might take nothing more than skillful application of well-established procedures, but making a new graphics engine in the first place (assuming it does something novel) or inventing a recipe for a new type of cake definitely takes problem solving skills.
I am saying there are different classes of what you are lumping under problem solving skills. Coming up with a new cake recipe does not involve building a new oven or measuring system. It's a well constrained problem. Use known techniques and apply some time and money gets a new recipe.
P vs NP on the other hand might not be possible to solve.
Yes, but inventing a new cake recipe (especially one fairly different than what you have baked before) uses a completely different set of skills than baking a cake, is the point.
You need to develop hypotheses about cake baking, test them empirically (e.g. by baking many cakes while varying one ingredient systematically), cross-apply knowledge from other cooking/baking experience, figure out workarounds to any problems that come up, at some point develop a high-level goal (e.g. mix a particular pair of flavors), and then check that your result matched your previsualized goal, tweaking the recipe in response to feedback until it comes out the way you want, keeping detailed notes matching recipes to results, etc. You need to have a much deeper understanding of cake ingredients and baking chemistry, and you need to work a lot harder at a higher level to invent recipes than to follow them.
If you are a cookbook author designing your recipe to be implemented by unskilled homemakers using unstandardized ingredients and equipment, or if you are a food chemist for an pre-packaged cake mix company, you might have an even larger set of concerns and required skills to invent a new cake recipe.
The kind of skills you learn while inventing new cake recipes might also be useful for solving other kinds of engineering problems. The kind of skills you need to follow someone else’s recipe to bake a cake are much more limited and domain-specific.
I must admit I still don’t understand why P vs. NP has anything to do with primary/secondary math education.