Usually because the people who teach math don't fucking know how to do it, and "teach" it in a way that doesn't make any fucking sense. It's probably worse now with common core. Algebra was a grade 9 study for me and I didn't really understand it until after I graduated. Geometry? No problem. Delta math? No problem. Vector Calculus? No problem. All that shit clicked with me, and when it did, algebra eventually did, too. Unfortunately, my grades do not reflect this.
If I didn't learn to code, I would still hate math, because programming is what forced me to learn delta math, vector calc, and geometry. That is another problem with teaching math in a classroom. You throw numbers and letters and symbols at children all day, and other than handling money, not fucking ONCE do you ever show a real-world example of what's being taught.
My solution? Ditch common core and put at least 50 3D Printers in every geometry classroom, with a toolkit, machinist's protractor, digital calipers, and set squares for each. Have the kids build them from a kit in groups of two or three, over the course of two weeks to a month, and grade them on how mechanically accurate the printer is, and the quality of the resulting prints. The kids get a hands-on example of what math can accomplish, and they get a printed object as a sort of token that they got somewhere with that knowledge. Once the course is over, disassemble the printers and do it for the next group of kids.
This alone teaches you geometry, and inside that, teaches you cartesian/delta kinematic plotting, light mechanics, working in a group, a little bit of data entry, and a lot of basic secondary math.