Every subject it is possible to study at school will be disliked by someone, not just maths and science. However, maths and science are perhaps disliked more commonly than the others, something evidenced by the shortage of engineers and general scientific types that is currently plaguing the UK. There are a number of reasons that could explain this trend.
It could just be because of bad teaching. Admittedly this could apply to any subject, but maths and science are particularly prone to poor teaching, because they, particularly at lower levels, involve a very great amount of learning facts. A good teacher can achieve this in an active and engaging manner. A bad teacher can do this simply by using the textbook as the sole basis of the lesson and letting it, not themselves, do the work. This leads to boring and repetitive lessons. In other subjects it can be a lot more difficult to rely so heavily on the textbook, because in the arts for example, you have to be more, well, artistic. English for example will require discussion, which implies that at least a good amount of the time the teacher will have to be leading the lessons directly.
At an early level, maths and science can seem quite boring and pointless. I remember finding science at school the most pointless, useless and boring thing ever invented. So what if you put a piece of potato in sugar solution it will lose weight because of osmosis? Where are the explosions?! Moving on to a higher level of science will allow students to be trusted with greater detail, more difficult experiments, and much more interesting subject matter. This is the same for maths – at a higher level you stop doing the adding up and long division and move onto the more difficult but more useful calculus and trigonometry. This may not seem very interesting, but now I am studying economics at university the maths I use (mainly differentiation) is a lot more interesting because it is applied.
Some people just aren’t into the sciences. Everyone has different ideas of what they find fun and interesting, and some people simply do not like science. I personally have always tended towards the arts, much preferring writing to experimenting, much preferring essays to equations. Interesting and competent teachers mitigate this effect to a degree but I have had some excellent maths teachers in my time and they have rarely done better than making the subject tolerable.
Science has a poor image? It does not seem that the above reasons have really answered the question of why science subjects are so much less popular than the others. There is no shortage of demand for science graduates, indeed much more demand than for most arts students, and yet it is the scientists that are having to be given financial incentives to take sciences at university, and science jobs in the UK at least are some of the most attractive to migrant workers who are often better qualified and more enthusiastic about doing them. So what is it about sciences that make them so much less attractive to so many teenagers? All I can think of that could apply only to sciences is a poor image. Partly because at first science seems so boring and pointless, and partly because nobody shows how potentially an interesting subject it can be, and partly because scientists (at least in the UK) do not enjoy the social status that they do in most of the rest of Europe, seems to be discouraging students. If they do not think they will be particularly well rewarded and respected for working hard at a subject, then they won’t bother and will become disillusioned. In the UK most people can hardly tell the difference between engineers (usually highly qualified scientists designing everything from cars to nuclear power stations) and mechanics (normally less qualified people who put your car back together for you when it fails). This causes, and is caused by, the apparent lack of interest in science in the UK. Because people in general don’t view science as all that exciting and valuable, teens don’t either.
It is hard to say whether this really answers the question or not. There will be all sorts of theories for why teens are studying maths and science less, and who can say which is the best, but nevertheless it seems plausible that teaching, initial lack of excitement, people’s individual preferences and society’s preferences as a whole that are at least partly responsible for the problems. How to solve the problem? It’s not easy, and that is a question for another time.