Cells are not only characterized by their internal components but also by the genes they express. Cells have to fulfill multiple different functions to be able to build complex multicellular organisms. Differently expressed genes lead to different proteins in the cell, which leads to different morphology, shape or function. They have to carry out the functions appropriate for the tissue they make up.
For example melanocytes in the skin are highly specialized cells which mostly make the pigment melanin. Plasma cells on the other are highly specialized for making antibodies.