They do it to mark their territory (including you as their property ). Smell is a very important feeling for cats. Sometimes it is even more important than sight. The whole cat body is covered with glands. On the face, they are around the eyes, ears and under the chin. When cats rub against legs or furniture, they leave there a unique odour. When another cat passes by, it will surely stop by and smell it as well, and perhaps will also rub against this object to leave the odor of its own.
People are waiting to help.