What exactly is your statement? People don't pay back the money they from their 401k? You shouldn't take money from your 401k to buy a home?
There are two ways to buy a home with money from your 401k, a) hardship withdrawal which is a taxable event along with a 10% penalty if you are under the age of 59.5 or b) borrow up to 50% from your 401k investments. Like you mentioned hardship withdrawal is a last resort because of the cost associate with it and most people don't go that route. Additionally, before you can do a hardship withdrawal you must first borrow the maximum allowed from you 401k and that's what people typically do. Now if you're borrowing money for the sake of buying a car, the money has to be paid back within 5 years, if you're borrowing money to buy a home the law allows you to payback the money within 10 years or longer. Utlimatly what's available to you is determined by the employer's plan so not every 401k plan is the same. Some plans won't let you borrow, some won't let you contribute while you have an outstanding loan. Some allow for repayment flexibility, others don't.
You are right in that the balance is due within 60 days if you lose your job. This is a risk people should be aware of before they jump in. Then again, if you lose your job you may have other issues to worry about than a 10% penalty. For me it wasn't much of a risk because I have huge amount of money in stock options that I could tap into at any point and easily pay back the loan. I could have sold those options but I choose not to because, well, my stock option value tripped since that time.
Bottom line, don't take distribution from your 401k, borrow from it....401k borrowing is a financial instrument that should be used wisely. Just like anything else in life, you aught to know the risks. If people can't pay it back, that's their own retirement money they are cannibalizing.
Here's a study on the issue:
http://www.rand.org/pubs/working_pap...RAND_WR799.pdf