If you've ever gone to the grocery store when you're hungry, you know what a big mistake that can be. You might have a list that only has three or four items on it, but when your hunger takes over, your shopping cart can fill up in no time flat. At best, you spend more than you had planned for things that you probably don't really need. Yet the clincher is that a lot of the time, not only do you come home with all this extra stuff, but you also find that you forgot to get one of the items that took you to the store in the first place.

A similar thing can happen with your savings goals. For instance, in saving for retirement, it may have taken you quite a bit of time and effort to get up the nerve to make that first IRA contribution or to sign up for your employer's retirement plan. Paycheck after paycheck, year after year, you may have sacrificed some things you would have enjoyed doing now in order to save enough money to keep adding to those retirement funds. At first, the slow growth in your account balances may have made you wonder why you were going to all the trouble. After time, though, those small regular contributions, along with interest, dividends, and capital appreciation, added up to a pretty substantial amount of money. You probably found yourself much closer to achieving your goals than you would have thought possible.

If you've made it this far toward your savings goals, stop and pat yourself on the back -- you're doing great. Now that you have a regular plan in place to make additions to your savings, the key to success is making sure that you don't get distracted from your primary goals.

They don't make it easy
Unfortunately, there's no shortage of distractions when it comes to money. Ever since you decided to start saving part of your income, you've had to overcome the usual competing interests for your money, such as your regular living expenses, favorite hobbies, and occasional expenses like travel and vacation costs. However, now that you've built up a bit of a nest egg for your savings goals, you may find that you have to resist additional temptations that you didn't have before.

Again, consider saving for retirement. Most people save for retirement using one of two tax-favored investment vehicles: an IRA or an employer-sponsored retirement plan like a 401(k). If the government said that you absolutely may not take any withdrawals from your retirement account for any reason other than retirement expenses, then it would be easy to maintain your discipline; once you made your deposit into your retirement account, you wouldn't be able to touch it until you retired. Tougher rules would protect you from yourself and your temptations.

Sadly, however, the rules aren't that stringent. In fact, they aren't stringent at all: You can withdraw money from an IRA at any time, and while most employer-sponsored plans have limitations on withdrawals while you are still an employee, you can usually take out up to the full amount of your plan assets once you're no longer employed by that particular company. In addition, most participants in employer-sponsored plans can take out loans from the assets they have in the plan, often in amounts of up to half of the entire account balance. As long as you meet the conditions in your specific plan, you can borrow against your 401(k) for any purpose without limitation.

You'll pay the price ... now and later
Granted, the rules do have some catches. While you can often withdraw retirement money before retirement, you have to pay tax on the amount you withdraw, and penalties will often apply. Yet there are exceptions for which you don't have to pay a penalty. You can avoid penalties on IRA withdrawals in some situations if you have to pay large medical expenses, medical insurance costs while you're unemployed, expenses for higher education for yourself or your children, or part of the purchase price for your first home. Similarly, you can avoid penalties on 401(k) withdrawals if your plan permits distributions for expenses due to a hardship, which generally includes the IRA exceptions mentioned above plus some other expenses, such as funeral expenses for a family member or home repair costs following a casualty loss.

Now few would argue that these sorts of expenses aren't important. The problem, however, is that by allowing withdrawals for these purposes, the law forgets that the whole point of individual retirement arrangements and employer-sponsored retirement plans is retirement. The lax withdrawal rules make it too easy for people to look at their retirement fund as a piggy bank that they can raid at will rather than finding other sources of money to use for other expenses.

The consequences of these withdrawals extend far into the future. For every dollar you withdraw now, you lose three things: the dollar itself, the tax and penalties on that dollar, and every bit of income and growth that dollar would have generated between now and your retirement. Just think: if you had invested that dollar in stocks like Urban Outfitters (NASDAQ:URBN) six years ago or AES (NYSE:AES) four years ago, you'd have $20 by now. For young workers with a long way to go before retirement, early withdrawals can end up costing them huge amounts of money over the remainder of their careers.

Keeping on track with your savings goals can be a big challenge. With discipline and perseverance, however, you can achieve exactly what you wanted from your savings.

For related Foolishness:

Take charge of your retirement goals by subscribing to the Motley Fool Rule Your Retirement newsletter. Fool retirement expert Robert Brokamp and a host of others put together information you need to know every month to guide you along the path toward retirement. Take a look now with a free trial.

Fool contributor Dan Caplinger suffers from IBS (impulse buying syndrome) in grocery stores, but most of the time, he keeps it under control. He doesn't own shares of any companies mentioned in this article. The Fool's disclosure policy gives you just what you need.