Why was Simon Peter the first pope even though he was married?
Peter was declared the first bishop of the Catholic Church and Vicar of Christ way officially only after Jesus had died. According to the Bible, Jesus had said that he would build his church and use Peter (whose name means ROCK, or Petra) as the rock of his church. This being said, Peter was NOT a Pope when he was alive and there is no evidence in the Bible that states that Jesus did anything remotely close as to bestow upon Peter a title such as "Pope."
"Simon Cephas answered and said, ‘You are the Messiah, the Son of the living God.’ Jesus answered and said unto him, ‘Blessed are you, Simon, son of Jonah: flesh and blood has not revealed it unto thee, but my Father which is in heaven. And I say unto thee also, that you are Cephas, and on this rock will I build my Church; and the gates of hades shall not prevail against it" (The Diatesseron 23 [A.D. 170]).
Therefore, although Jesus does seem to have placed a responsibility upon Peter, the official version of events doesn't occur until way later.
As often happens with major religions, most of these adjudications are given by other people. There were more than plenty Councils (meetings among the elders of the Church) where the Bible and the teachings of Jesus were, let's say, "amended" for the benefit of some and the ignorance of many. This is also why Peter would have been able to be a Pope AND married to boot: Because the statutes placed upon priests were established even further on during the Council of Elvira (circa 300 years AFTER Jesus's death which stated that
Bishops, presbyters, deacons, and others with a position in the ministry are to abstain completely from sexual intercourse with their wives and from the procreation of children. If anyone disobeys, he shall be removed from the clerical office.
Therefore, the official post of Peter is unclear as far as the modern definition of what a Pope is. However, let's suffice to say that the Bible does state that Jesus had a plan for Peter (if the translations from Arameic to Greek did not corrupt the words Petras and Petro) and that the official title of Peter as Pope is basically a title given later by the Councils and translators of the Bible.
Please take a look at the link provided to get information of the origins of Peter as Pope.
The reason that Simon Peter could become (as tradition has it) the first pope even though he had a wife is that there was no rule saying that priests had to be celibate at that point in the history of the Church.
There is nothing in the Bible that explicitly says that priests or other church leaders must not be married. This is why Protestant sects typically do not require their clergy to be celibate. Over the years, the doctrine has evolved within the Roman Catholic Church to the point where clerical celibacy is seen as an unbreakable law. However, this was not always the case. In the early years of the Church, there was no such tradition and so it was possible for a pope to be married.
In 1022 Pope Benedict VIII banned marriages and mistresses for priests and in 1139 Pope Innocent II voided all marriages of priests and all new priests had to divorce their wives. Why? Without heirs their property would go back to the church. When I first heard this from an ex-Priest, I was floored.