It's called bunting and it's hello in cat. When you see the cat bunt and rub they're mingling scents so that they're both part of each other's territory. This is especially important as scents are as big a part of their language as adjectives are to ours.
I've always heard that they are rubbing their face along whatever they want to mark as their own and claim, they have scent glands on their face/mouth. A hard 'bonk' is their joy at greeting someone, whether human or animal, and sometimes they get a little carried away. Cats that are friendly always greet each other with a 'bonk', it may be a way of getting the other cats/person's attention. Maybe they don't do the actual rubbing to mark because they already know that it is claimed as theirs anyway (?) I have one little guy that bonks and rubs so hard he falls over and then he squirms on the ground, demanding attention!