What subjects are you comparing with? I don't know whether the situation is that much better for physics, for instance. I think part of the problem is that mathematics books are in general either targeted at experts or at professors who need to assign a textbook. It looks like publishers believe the market for self-taught mathematicians is too small. In contrast, programmers are a pool of people who are willing to spend money on books to teach themselves, because they hope it will have a direct career benefit.
That said, mathematics curricula must vary a lot from country to country. I was taught the fundamental of calculus in my penultimate year of high school!