Not all Machine Learning (ML) tasks are classified as classification. Although classification is a widely used task, ML also involves other tasks such as regression, clustering, anomaly detection, and reinforcement learning. These tasks vary in their objectives and methods, such as regression predicts continuous values, clustering organizes data based on similarity, and reinforcement learning (RL) focuses on decision-making.
No, not all machine learning tasks can be viewed as classification. There are other tasks like regression, clustering, and reinforcement learning that go beyond simple categorization.
I would say that almost all of them can be reformulated as classification, but that would also change the meaning a bit or you would lose something. For example, if you try to predict the price of electricity, you can predict a floating point value or classify to a price bin. And in clustering you could classify an instance to a cluster. But probably the standard classification methods, like Random Forest would perform much worse than the clustering algorithms in many clustering problems.