Wikipedia defines atom as
The atom is a basic unit of matter that consists of a dense central nucleus surrounded by a cloud of negatively charged electrons.
and defines electron as:
The electron is a subatomic particle with a negative elementary electric charge. An electron has no known components or substructure; in other words, it is generally thought to be an elementary particle.
My confusion is:
Why is atom being called as basic unit of matter, when it consists of electrons, protons etc, which have masses. These particles electrons should be called as basic unit of matters, instead.?