The kind of cells that living organisms are made up of is a more basic characteristic for Classifying organisms, than on the basis of their habitat.
This is because on the basis of the kind of cells, we can Classify all living organisms into eukaryotes and prokaryotes.
On the other hand, a habitat or the place where an organism lives is a very broad characteristic to be used as the basis for Classifying organisms. For example, animals that live on land include earthworms, mosquitoes, butterfly, rats, elephants, tigers, etc.
These animals do not resemble each other except for the fact that they share a common habitat.
Therefore, the nature or kind of a cell is considered to be a fundamental characteristic for the Classification of living organisms.