'Pit' has been used as a verb meaning 'to set against' since the 1700s. It is based on the idea that, in those days, dogs and birds (I really mean the word for male birds, but I'm sure AB won't let me use it!) would be set down in an actual 'pit' in order to fight to the death. Since then, it has been used in any situation involving adversaries or conflicting ideas "fighting it out", as it were.