Machine learning becomes essential when we cannot directly write a computer program to solve a given problem, but rather need example data or experience.
Learning is necessary when human expertise is absent or when humans cannot explain their expertise.
Machine learning is also beneficial when the problem to be solved changes over time or depends on a specific environment.
By compiling example data, machine learning algorithms can approximate solutions for tasks where explicit algorithms are not available.