SAN FRANCISCO/ CAPE TOWN (Reuters) - Uber co-founder and former CEO Travis Kalanick used to tell investors he liked to keep his company teetering between order and chaos.

By the time he left, it was chaos. The company was battered by a slew of scandals, including revelations it had used illicit tactics to handicap competitors and dodge regulators.

Almost two years later, under new leadership and set to debut Friday on Wall Street in the largest U.S. public stock offering since 2014, Uber Technologies Inc is still testing the rule of law.

With growth slowing, the company continues to spar with local officials around the world looking to limit Uber cars on their streets.

In Cape Town, South Africa, for example, Uber dominates the market with an estimated 7,000 drivers, most of whom are operating illegally, according to city officials. Uber blames Cape Town’s “broken” system for approving ride-hailing licenses.

In the United States, Uber has used the courts to try to block what it see as unreasonable restrictions on its business. And it has successfully lobbied state legislatures to pass laws preempting local ride-hailing regulations, much to the frustration of officials in some cities where it operates.

Uber insiders say CEO Dara Khosrowshahi has made strides in cleaning up a frat-house culture that spawned allegations of sexual harassment and embarrassing leaks of executives behaving badly.

But Uber’s sharp-elbowed business tactics, detailed by lawmakers, city staff and regulators across the globe, as well as drivers and former employees, continue to drive the company.

“It’s in the DNA,” a former Uber manager said. “Old habits die hard.”

Whether its playbook delivers the growth and profitability public market investors will be seeking remains to be seen. Revenue growth slowed to 2.3% in the fourth quarter over the previous quarter, a worrisome sign for a business that lost more than $3 billion last year.

Uber’s economics “are not immediately or obviously attractive for sustainable, long-term investment,” Mark Hargraves, Head of Framlington Global Equities at AXA Investment Managers, said in a recent note to clients.

Slideshow ( 3 images )

An Uber spokesman declined to comment. In its IPO filing, the company said it is “using a proactive and collaborative approach with regulators” and “rebuilding and strengthening” its relationships with cities. Where ride-hailing is banned, Uber is instead offering e-bike services or partnering with traditional taxi companies.

Still the company acknowledged “legal and regulatory obstacles” around the world that could impede its revenue and growth.

CAT AND MOUSE IN CAPE TOWN

Thousands of miles from Wall Street, Uber is pushing the bounds of regulation.

In Chile, which has yet to work out a regulatory framework for ridesharing, Uber drivers have been known to enlist passengers to help them evade transit cops. In Mexico City, Uber has protested new safety rules it says would limit the number of riders who could use the app. In London, Uber is on probation after it was temporarily banned for flouting safety rules.

And in Cape Town, Uber has entered its fifth year of a stalemate with local officials.

Every ride-hailing service in Cape Town is allotted a certain number of operating licenses for its drivers. As of mid-April, Western Cape Province, where the city is located, had approved 760 such licenses for Uber. But the city estimates there are roughly 10 times that many Uber drivers plying its streets, many of them immigrants or refugees.

Foreign-born drivers must also have work permits, paperwork many of them lack, according to city aldermen and drivers.

Uber said it allows drivers to start work while their ride-hailing licenses are still pending approval but that the company thoroughly vets the drivers.

A game of cat and mouse has ensued: drivers alert each other to the whereabouts of traffic cops through the WhatsApp mobile messaging service. If their cars are impounded, they pay the fines, start driving anew and wait for Uber to reimburse them.

Slideshow ( 3 images )

Those impound fines start at almost $500 and go up with each subsequent offense, topping out at more than $1,000. Drivers are fined an additional $173 each time.

“It’s just like gangsterism fighting for turf,” said Ivan, a South African driver who gave only his first name.

Uber has spent at least $2.3 million since 2016 to reimburse drivers for the impound fines, according to Reuters’ estimate based on data from the city. Uber declined to say how much it had spent, but said it would continue paying the fines to support its drivers and get them back on the road.

South Africa is crucial to Uber’s Africa strategy, boasting the continent’s most-developed economy.

A spokesperson for Uber South Africa said Cape Town’s licensing system “is effectively broken” and blamed the city for what it says is a backlog that can stretch for more than two years in some cases.

The city estimates there is a market for about 2,100 Uber drivers. Alderman JP Smith said part of Cape Town’s calculus is to head off violence that could result if too many taxi drivers are put out of business by new ride-hailing rivals. In the larger cities of Pretoria and Johannesburg, some Uber drivers and cabbies have been killed and their cars torched as part of an ongoing turf war.

“In other parts of the world, if there are too many taxis some just stop being taxis,” Smith said. “Here, disputes between taxis are settled via assassination and murder.”

The face-off may not find a resolution any time soon. Cape Town is expanding its impound facilities so it can take in nearly twice the number of cars.

BAD BLOOD

Big cities concerned about gridlock, air quality and the safety of passengers and drivers are crafting new policies and demanding more data from ride-hailing companies to find solutions.

Uber is pushing back. The company sued New York City in February over a law imposing a cap on the number of ride-hailing drivers, a move taken to address worsening traffic. In its hometown of San Francisco, Uber is fighting a court order to turn over data the city says would help improve traffic management and the safety of Uber drivers.

As city officials in the United States have gotten scrappier, Uber has sought out friendlier state legislators to work around them.

Over just four years, Uber and rival Lyft helped pass laws in 41 states that put ride-hailing under the state’s jurisdiction, preempting some or all local regulations, according to a 2018 study by the National Employment Law Project.

Uber is now pushing legislation in Oregon that would preempt local mandates on driver caps, permits, data collection and access for passengers in wheelchairs, among others.

Uber’s general manager for Oregon said the bill would create “increased mobility for rural and urban communities,” by bringing Uber to towns that currently do not allow it.

Officials in Portland say their city is in the crosshairs. After Uber launched there in late 2014, Portland sued to stop its operation, declaring it illegal. That suit was later dropped, but Portland regulates Uber closely.

Noah Siegel, interim assistant director at the Portland Bureau of Transportation, said the proposed legislation would hurt the city’s ability to manage growth and ensure everyone can get around safely.

“We were not really holding a lot of bad blood about what had happened” with Uber in the past, Siegel said. “But this bill serves as a reference point that it’s only been four years and they still haven’t turned a profit and they will do anything to make money.”