during the regular cleaning cycle, the heads build up a meniscus of ink for the wipers to take off (along with anything that shouldn't be there, if it is all working). The wipers pull from the back to the front of the head, removing the blob of ink in that sweep. most of the ink is pulled off, some smears off the sides and to the front of the print head, hence why it is dirtier around the print head after a cleaning compared to before.
As mentioned before, wipers play an integral part in this, but so does the wiper scraper. the wipers clean themselves off on this, and if it is loaded with ink, or missing (they break sometimes, or get stuck) it makes this issue worse.
The scraper itself is a piece of plastic behind a metal plate where the wipers sit when not in use, kind of shaped like a bowtie. if it is not broken, it can be cleaned a tediously put back where it came from.