History of Christianity
Bishops collected revenues from estates attached to their bishopric.  Noblemen who held lands (fiefdoms) hereditarily passed those lands on within their family.  However, a king had more control of lands under the domain of his bishops.  Kings would give bishoprics to powerful friends.  If a king left a bishopric vacant, he got the money until a bishop was appointed, when he was supposed to repay the earnings.  This seldom happened.  The Church wanted to end this lay investiture because of the vacant sees simony and other problems.  Thus, the Investiture Contest was part of the Church's attempt to reform the episcopate and get better bishops.