When my sister was a Relief Society President she bought a book, that she later loaned to me, titled Get Anyone to do Anything. It wasn't a how-to-guide for extortion and blackmail, but rather an explanation of the workings behind human decision making.
One of the major cogs was the basic human need for consistency. People like to feel that they are internally consistent. We like to feel that our actions reflect our beliefs. Most especially, we hate changing our minds. Those who change their minds easily are fickle, hypocritical and pushovers. When a person has taken a stance on an issue they are reluctant to alter that stance, even if their feelings have changed. The book recommends offering circumstances that change the situation, thus allowing the person to change their mind without damaging their internal consistency.
We see this sort of thing all the time. You invite someone to your house for dinner and they initially decline. Later you mention that you'll be making your special cookies, and remind them that the invitation still stands. The addition of the cookies gives the invitee a reason to change their mind and allows them to accept the invitation without being percieved as fickle.
As a youth I learned that it is unwise to declare that "I will never do [x]." If I changed my mind, my siblings would dredge up my earlier declaration and use it to taunt me. As an adult I see that this is still wise advice. Making declarations such as "I will never drive a minivan." create mental boundaries that can hamper one's decision making abilities. Years later, a minivan may be the best car to drive, but I might foolishly choose to buy an expensive, gass-guzzling SUV simply to remain internally consistent.
This is quite possibly the genius behing having fast and testimony meetings. Public declarations of faith require some amount of follow-through to maintain consistency. We are more likely to meet our goals if we have shared them with others. If I bear my testimony that President Hinkley is a prophet, I will put much more effort in to following his guidance, lest I be thought hypocritical.
Along those same lines I wonder if part of the church's discouragment of delving deeply into church history is from a fear that they might find altering circumstances that allow them to change their minds about the church. The shady history and weird doctrines are the special cookies that allow some to change thier minds and leave.
How hard is it to imagine people who have left the church saying things like, "I had a testimony of Joseph Smith, until I learned that he had 30 wives." Or, I had a testimony of the church, until I learned about Brigham Young's racism."
While I do not doubt that many people are legitimately bothered by some parts of the church's past, I find myself wondering if some people hadn't already changed their minds, but needed some altering circumstance to help them maintain their internal consistency. That is to say, they already wanted to leave the church, but needed something to negate their earlier declarations of faith. If that is the case, then can we really blame their leaving the church on those things they uncovered and what other reasons do we have to keep those things on the down low?