I am a Christian but not a theologian (and it's been a few years since my most recent Bible study) but I will do my best.
In general, giving is based on two principles: first, we and all that we have and are come from God and belong to God, so giving helps us remember that. Second, as God's children, we have the obligation to care for those who are in need with the gifts that He has given us. Several of the other postings mention the cost of running churches and providing services to members, and tithing does cover that, but for most churches (at least those in the big Protestant denominations) tithe money also goes to support the needy of the community (meals for the homeless, after-school programs), either through church-run programs or by grants to community organizations and, through the denomination, international giving to medical clinics, clean water projects, etc..
Giving a tenth, to my understanding, goes back to Jewish custom of Biblical times. The 10% figure is mentioned in the Old Testament. The New Testament, either Gospels (the stories and teaching of Jesus himself) or Acts/Epistles (the stories and teaching of the early disciples) never specifically gives a 10% number for appropriate giving although it makes it clear that a Christian should share what he or she has cheerfully and generously. In fact, a couple of verses (2 Corinthians 8:12 For if the readiness is there, it is acceptable according to what a person has, not according to what he does not have.) and 2 Corinthians 9:7 (Each one must give as he has decided in his heart, not reluctantly or under compulsion, for God loves a cheerful giver.) might seem to indicate that each Christian needs to decide for him or herself what the right gift is to give. Certainly Jesus often indicated that it was important to rethink Jewish tradition in the light of Christian principles instead of accepting long-time customs blindly.
Not all Christians or churches practice the 10% rule of giving, but many people find it to be a useful rule of thumb--much like auto-transfer to your savings account, choosing a standard figure to give at removes the struggle of temptation to be selfish that is present if you make a decision anew every week or month.
Now, the question of how much to give when you are in financial trouble is complicated. We have seen some true "hair on fire" situations on these boards--people who honestly do not bring in enough income to cover their legal obligations and take care of their families. Most pastors I know would say that in those cases, it's important to give something (even putting a dollar in the Salvation Army kettle) to remind ourselves of our obligations to God and each other, but the 10% level may not be the right choice at that time. But as we have seen with a lot of these case studies, there is almost always fat in the budget. If you are going out to dinner and on vacation, but you say you can't afford to give, it's time to be more honest with yourself. Then there is the question of what to do if you are paying down debt early (which many Mustachians consider to be a "hair on fire" situation.) Now, you could argue that by paying off debt quickly and saving on the interest, you will then have more resources from which to give later. However, the truth about humanity is that we are always tempted to selfishness, and it's very easy to make promises to God that we don't actually fulfill so for some the best choice is to tithe in the moment even if it means a smaller gift overall. You can also argue that paying down debt faster than the legal obligation (to retire early, for instance) is a luxury, and that tithing needs to come ahead of that. Each person would have to pray on that and come to their own conclusions.
Overall, though, the idea of tithing is in some ways very Mustachian. MMM is always telling readers what utter luxury we live in, and he's right. Part of the Christian obligation is to practice good stewardship with what we've been given, and choosing to live below our means, make good financial decisions like not racking up consumer debt, and question the lifestyle that most Americans accept without a lot of thought are all part of good stewardship. It's just a question of what we do with what's left over.