The four elements of earth, water, air and fire, is just one way to classify physical matter, roughly corresponding to the physical states of being solid, liquid, gas and plasma.
The Buddha was not a chemist or physicist. Contrary to popular thought, he was also not a philosopher. He was an ancient psychologist, trying to solve the problem of ending (mental) suffering.
His classification of psychological elements was incredibly detailed, and psychologists and psychiatrists of today are still trying to make use of his teachings on mindfulness to devise therapies. However, his classification of physical elements, were rudimentary, and just sufficient to suit his needs.