In a remote corner of Jakarta's Ragunan Zoo, a Malayan sun bear is pacing back and forth, shaking its head in an agitated manner. There is no shade or shelter in the tiny, dilapidated enclosure – just a stagnant pond full of rubbish. The bear, which is riddled with mange, rears up against a concrete wall and howls.

It's a scene that is not uncommon in Indonesia, where zoos have come under scrutiny following the death of a giraffe in Surabaya, East Java – later found to have a 40-pound wad of plastic in its stomach. In a country known for its rich biodiversity, many rare and threatened native creatures – such as the honey-eating sun bear – are kept in squalid and cramped conditions that appal animal welfare experts.

Conservationists, who have been lobbying for standards to be raised, were horrified by a recent announcement that Indonesia and China plan to exchange emblematic animals as a mark of friendship. The former will receive some endangered pandas, the latter some rare Komodo dragons.

At Surabaya, dubbed the "zoo of death" by The Jakarta Post newspaper, more than 700 animals died prematurely – mainly from disease and malnutrition – between 2008 and mid-2010. While the mortality rate has decreased since Tony Sumampouw, secretary of the Indonesian Zoo and Aquarium Association, was drafted in, Surabaya – where the giraffe swallowed plastic packaging thrown into its enclosure – remains chronically overcrowded.

According to Mr Sumampouw, enclosures have not been updated for 50 years. "We have 167 pelicans in a 40-metre by 20-metre cage, so they can't even open their wings," he says. "We have more than 20 lions and tigers, and most of them never see the sunlight, they never enjoy the fresh air, they never exercise." One rare white tiger, a gift from the Indian government, has been outside so rarely that, as a result of back problems, it can barely stand up.

Across the country – particularly in zoos owned and run by municipal governments – listless and unhealthy animals are kept in ageing pens, looked after by keepers with no training and little interest in the job. Diet and veterinary care are poor. "The people managing our zoos only think about profit," says Made Wedana, an internationally respected biologist who ran the primate centre at Ragunan Zoo for five years. "They don't really care about animal welfare, or understand zoos."

One of the biggest obstacles is cultural. In Indonesia, zoos are regarded as cheap entertainment for the impoverished masses. Admission is as little as 4,000 rupiah (27 pence): a trifling sum even for working-class Indonesians.

On a recent public holiday, Ragunan Zoo – in Jakarta's teeming southern suburbs – was already crowded at 7.30am. Dangdut music (a local brand of pop) blasted out of radios, and motorbikes thundered around the sprawling zoo's sealed tracks. Dozens of roadside stalls sold food, soft drinks and souvenirs. Two children fed popcorn to a striped deer, and visitors laughed as a critically endangered Sumatran elephant slapped itself repeatedly with its trunk.

The primate centre – a modern complex established with a multimillion-dollar bequest from a Dutch conservationist, Pauline Schmutzer, who hoped it would encourage Indonesians to value their native wildlife – was a contrast to the rest of the zoo. There, gorillas roamed on a large, jungle-clad island festooned with dangling ropes and tyres, and a female orang-utan reclined in the shade, eating a starfruit, with her outstretched arm around her baby.

However, Mr Wedana believes that even that centre – which was modelled on John Aspinall's Kent zoo, Howletts, and where staff were trained by Howletts – has deteriorated since being handed over to local management.

Indonesian zoos have been accused of fuelling the illegal wildlife trade – and the plundering of wild populations – by acquiring animals from dubious sources. Within zoos, theft and corruption are rife. At Surabaya, keepers are believed to have stolen and sold Komodo dragons, and even to have pilfered meat destined for the emaciated tigers.

Ian Singleton, director of the Sumatran Orang-utan Conservation Programme, and a former zookeeper at Jersey Zoo, now the Durrell Wildlife Conservation Trust, says Indonesian zoos should breed their own animals and swap them with other institutions. Instead, uncontrolled breeding takes place – unlike in Western zoos, contraception is rare – creating in-bred populations and massive overcrowding.

Mr Sumampouw is at his wits' end. His efforts to euthanize surplus animals or transfer them to other zoos have been blocked by Surabaya's board. In Indonesia, a mark of a good zoo is having a large number of animals.

In many government-run zoos, Mr Wedana says, keepers just feed the animals and – occasionally – clean the enclosures. "It's not enough for the animal welfare," he laments. "What about their enrichment? What about exercise? What about population management?"

He used to run workshops, teaching zoo staff from around Indonesia how to keep animals healthy. But they failed to practice what they learnt, he says – out of apathy, or because their superiors were uninterested. After being trained in the UK to look after gorillas, some Ragunan keepers were put in charge of tigers on their return.

Mr Wedana also tried without success to persuade the Governor of Jakarta – who has responsibility for the zoo – to upgrade enclosures.

"But the attitude is that if an animal dies, we'll just get another one," he says.

Writing in The Jakarta Post recently, Mr Singleton said: "Managing a zoo is not rocket science. Many animals will survive and even breed if simply given a safe and sheltered enclosure, clean drinking water and adequate nutrition." He believes entry fees for Indonesia's 50-plus zoos should be increased, enabling them to re-invest in infrastructure and animal care – and engendering more public respect for wildlife.