I can't figure it out.?

I know the expression "to hit it off with someone" means to get along well with someone, but I don't understand where the expression came from. I don't see why the action of hitting something off is related to the state of being friendly to others. Can you explain that to me?
6 answers 6