I go out on a limb and have a controversial answer:
All the problems in machine learning are not optimization problems.
Before you object, think twice. What about training a deep net? Isn't that an optimization problem. It sure is! But the underlying problem, i.e. the one which is the machine learning problem, is to build a deep net that is able to predict the outcome for unseen data. (If you know the terms: Training the net is minimizing the empirical loss, but the goal is to minimize the expected loss over the unknown distribution of the data - why minimization of the empirical loss works as good as is does is not full explained to this day.)
Isn't clustering an optimization problem? Well, yes and no. You can cluster according to some objective and then you need to solve an optimization problem. But there are different objectives which could make sense and again, the underlying problem in unsupervised learning does not have an objective, but the goal is "to discover hidden clusters in the data".
Isn't regression an optimization problem? The answer is the same: You can use optimization to compute the regressors, but the underlying problem is prediction of unseen data.
Don't get me wrong: Machine learning uses and needs a lot of optimization (and constraint programming is no exception) but the real problems in machine learning (mostly prediction) are of a different type.
I may have another point as to why AI/ML gets so much attention: Recent results in machine learning are surprising (to both scientists and non-scientists), since ML can make the computer do things which we as humans can not explain, because we have no idea how they work. I (and I guess anybody else) do not have any idea on how to write an algorithm that makes the computer tell what is on an image. It's not that we did not try. Computer vision developed tools for about 70 years, but nobody could write a programm that makes a computer tell "This image shows a car." Now machine learning can produce algorithms which do exactly that. But the difference is: The programmer did not directly encode any mechanism to detect cars. That's a big difference to all the things that have been done in optimization. We have tons of great code that can make the computer do incredible things. But we worked hard to figure out all that lines of code and basically we can tell exactly what we told the computer to do. If you don't like images: It's the same with the question "How can we make a computer understand spoken language?"