Math and science tend to get a bad rep because math builds upon itself and you will see things you learned in 1st grade still in equations in high school and college. Science uses a lot of math too so if one is terrible at math ergo they are terrible at science. Another reason is core classes aren't very interesting normally and after being in the same class for 8+ years most people don't want to take/sign up for a class that is more in depth with the topic. Personally I love science, history, and astronomy. They are just topics that to enjoy you need to want to learn more about things and question how things work and why they work how they do. Most people don't care how their phones or cars work and that is rather basic ergo the reason why you perceive them to be not very well liked.
I'm good at math but I hate it. It's so BORING. I love science but maybe it's what people are learning in school that affects their interest. They may find some subjects less interesting than other ones like phys ed, dance, lunch, and recess.