The decision to take a vow of celibacy is easier for someone who doesn't have much interest in heterosexual relations anyway and/or already has incentive to hide their attractions . "Loneliness" doesn't cause this kind of stuff to happen. As Dice Clay said (albeit rather more crudely), you either do or do not have homosexual attractions. Therefore, from the time of the sexual revolution among heterosexuals, the "costs" of becoming a priest have definitely been lower for gay men than straight men. So the decision was easier, and indeed had the fringe benefit of not having to make excuses for not being interested in women.
Father Cozzens, the rector of Saint Mary's seminar in Cleveland (ironically, the seminary that produced the late John Cardinal Krol, a staunch defender of celibacy) speaks on this quite a bit, though he speaks more about the gay subculture that has sprung up in some seminaries. Ironically, the increasing openness of gays will diminish the incentive of closeted gays to become priests, lessening the issue. Of course, that means even less priests.
Having some knowledge of the history, structure, and politics of the church (though not a believer), I expect that within five years of the ascension to the Papacy of the first Pope born after about 1935, there will be non-celibate orders of priests. Not so much because of the "gay" issue, but because of the shortage.
-Eric
I am a believing Catholic, and I am increasingly convinced that the vocations shortage is artificial. It is created by the quisling pro-homosexual, pro-priestess faction that controls many diocesan chanceries, vocations offices, and seminaries. This faction actively discourages vocations among orthodox Catholic men loyal to Catholic teaching, to Rome, and to the Church, because those men will not advance their agenda. Their ultimate goal is to present to Rome a priestless American church as a fait accompli, with the subtext being, "If you want priests again, ordain women."
This is my assessment as well, but I can speak only as an observer, being non-Catholic, myself. During the same period, I would say, the "costs" of taking a vow of celibacy went up for heterosexual Catholic males due to the "sexual revolution".
I am doubtful that simply cleaning up the homosexual infiltration of the Priesthood (if it's even possible at this point) will be enough to refill the seminaries with heterosexual males. The creation of an order of parish priests who were allowed to marry would bring in a surprising number of young Catholic men to seminaries, IMHO. Of course, I was raised in a Protestant tradition and am comfortable with a married clergy.