It's good for both taxi drivers and riders if everyone follows some kind of convention for how much going somewhere will cost. I've never seen a place where each taxi can have its own different complex fare schedule, probably because some taxis would hit unsuspecting or unmathy customers with a surprising fare (many people wouldn't understand what it meant if a taxi charged $2 to the power of the number of miles traveled).
For the viability of the taxi business, it doesn't matter exactly what the conventional fare is, as long as plenty of people are willing to charge / pay it and everybody follows it. Singapore has a nice taxi system with a complicated fare structure. Right now I'm visiting Chiang Mai, a laid-back town in Northern Thailand full of cheap delicious food and friendly people. Among the major means of transportation are songthaews -- pickup trucks with two benches in the covered bed, from the Thai word song (2) and thaew (row) -- which will take you and some other customers a short distance for a flat fare of 20 baht / person.
The free market system one does see in some places, either as a legally established option or as the way things run de facto because price regulations aren't enforced, is one where you have to haggle with the taxi driver about the price of going to your destination. I've done it in other parts of Thailand, and I hear it's common in Malaysia. People's sentiments will vary, but I don't like this system. Haggling takes time, is unpleasant, and can result in no deal happening because somebody presented an overly ambitious ultimatum when both parties were actually willing to settle for a middle price. It also can lead to visitors who aren't familiar with the local haggling economy getting ripped off.
It's not that having convention or the government set a fixed price is a perfect solution. Maybe government will set the wrong price and lots of good business will never happen, either because the price was too low to interest a lot of drivers or too high to interest a lot of riders. And maybe our conventions will get outmoded and be difficult to change, leading to a similar result. But if you want to avoid haggling for everything, it's important to have fixed prices come about in some way or another.