Because the advantages of trade (lower prices) fall into the hands of the person making the decision (the buyer), there's a constant tendency to move toward freer trade, unless there's some sort of institutional pressure in the opposite direction.
The government is one source of institutional pressure. It can impose tariffs or create a vast array of other trade barriers--import quotas, local content rules, regulations designed to favor local producers, rules on the movement of capital and labor, etc. There are also non-governmental institutions structures intended to favor localization. One is local currencies.
History of local currencies
Local currencies are reinvented all the time.
At my local "Taste of Champaign" (a community event where restaurants set up booths in the park), the organizers sell "tickets" which are then used to buy food. This provides security (the actual cash money is all in one central location), convenience (prices are all in whole numbers of tickets, so there's no need to make change) and profit (tickets are sold in packets of 5, so some people will go home with unused tickets). Disney World does much the same thing. Subway and bus tokens fall into this category as well.
Tokens have always been used to promote customer loyalty, much as prepaid gift cards are used now--the business has your money, so they're pretty sure you're going to come back. Things like frequent flier miles and frequent customer punch cards also serve this purpose.
When there has been a shortage of money, such as during a deflation, businesses would try to use tokens as a way to conserve cash. The proverbial "wooden nickels" that you're not supposed to take are an example. The business would make change as usual, but include a wooden nickel--which it would accept as five cents in a future transaction. Sometimes those wooden nickels, especially if issued by local store that was viewed as sound and sold a wide range of merchandise, would actually enter the local circulation, with other shops accepting them and then either giving them out in change or redeeming them at the store where they had been issued.
Local currencies in larger denominations are sometimes issued by a major employer when it can't get its hands on enough cash to meet payroll. Sometimes called "scrip," this was usually intended to be redeemed in legal tender once the cash shortage was over, but could circulate as money, with local businesses accepting the scrip as payment, since the alternatives were either to offer credit or to do no business at all.
Local currencies were also sometimes issued by local governments, which would agree to take the scrip back for payment of taxes, giving it a definite value.
Modern local currencies
For the past sixty years, modern central banking has made the sort of deflationary panic that led to money shortage nearly unheard of. (We've been much more likely to face inflation instead.) However, local communities still suffer from the other downsides of globalization that I talked about in Trade versus localization. In particular, the profits made at chain stores and the like are drawn out of the community. There's a movement to resist that, through the use of local currencies.
The basic idea is to have a currency which is only of value locally. The big chain stores won't take it, so it won't be drained out of the community that way.
To make the currency valuable, someone has to accept it as payment, which is why currency issued by governments and large local businesses are typically more successful than others. But it's possible to bootstrap a local currency without any such support. Any group of people that gets together and agrees to accept a local currency can make it work, and there are plenty of successful examples.
Why would you accept local currency when you could hold out for dollars? Generally, only if you were pretty sure someone else would accept the local currency when you wanted to buy something. Most businesses that sell actual things (where the supplies probably need to be bought with dollars) can't afford to accept local currency (or can only accept it for a fraction of the transaction), but local currencies can be pretty appealing for people who offer services and who want to buy services--especially among people who are chronically under-employed.
For example, an aroma therapist can take local currency from clients who would otherwise be unable to afford the services. The therapist can then hire a dog walker who can then go to a massage therapist who can then hire a babysitter, etc.
Perhaps the most commonly cited success is Ithaca HOURS, a local currency used in Ithaca, New York. That local currency is denominated in hours, with a goal of encouraging people to value the labor involved in doing the work (although there's no rule that says you can't charge more or less than one Ithaca HOUR for one hour of labor). The Ithaca HOURS website includes a directory of people who have agreed to accept them in payment, and although there are plenty of yoga instructors and spiritual counselors, there are also accountants and bakeries and roofing contractors.
While Ithaca HOURS are actual, paper bills that change hands, there is no need for physical notes. Many other systems, such as LETS, Time Dollars , and Time Banking are essentially a bookkeeping system--a central registry keeps track of who has (or owes) some number of dollars or hours.
Nearly all of these systems are designed so that holdings of local currency earn no interest. (Some are even designed so that holdings actually decline in value.) The point is for the money to actually circulate, promoting commerce. When there are productive assets sitting idle, that actually works. (This fact is why inflation is often welcomed in the early stages. It goes badly awry, though, if there isn't ample productive capacity sitting idle.)
There's a completely different kind of money sometimes called "private money," often backed by gold or silver, which is very nearly the opposite of local currencies.
One example of private money is e-gold, an internet payment system that denominates accounts in terms of ounces or grams of gold or silver. One account holder can pay another in grams, ounces, dollars, euros, etc., and the system converts the payment into a specific amount of precious metal (if necessary) and moves that amount from one account to another.
Liberty Dollars, on the other hand, are actual, physical gold and silver coins (and some paper money as well).
Because precious metals are universally recognized, private money does not have the "local currency" effect of increasing commerce.
Legality and taxes
In the United States, there's no law that requires people to use dollars. (The legal tender laws require that you accept dollars in settlement of a debt that's denominated in dollars, but since 1975 it has been legal to write a contract that requires settlement in gold (or Ithaca HOURS) and courts will enforce it.) Anybody can create any currency they want, as long as they don't pretend that it's US dollars or make them look so similar as to violate the counterfeiting laws.
As far as the IRS is concerned, any sort of economic transaction probably involves income on one side or the other (and probably both). If a handyman builds a new porch for a dentist and the dentist puts braces on the handyman's kid, the IRS expects that each person would pay taxes as if he'd been paid in cash for the services. Since no actual cash is changing hands, it's easier as a practical matter to fudge around the edges in terms of exactly how much income is involved, but the taxes are still owed. With local currencies, the situation is roughly the same--you need to pay taxes (in dollars) on the value of whatever income you receive, but it's up to you to keep track, to decide what the dollar equivalent is, to report the income, and to send in the payment.
Let me note that I don't use any local currency or private money system. Do your own research and use your own best judgement before choosing to do business using any of these systems.