When is a private sector company not a private sector company? When it is repeatedly bailed out by government as soon as it finds itself in a fix. And G4S is not any old private sector company. It is, according to its own website, “the leading global integrated security company”. With 610,000 employees it is the world’s third-largest private sector employer, and the largest in Europe and Africa.

Yet if it were a genuine private sector company it would live and die by the sword. It would not repeatedly win new contracts after failing to fulfil its brief, it would not be rescued by elite state teams when it lost control of a prison, and it would not be able to call upon the army as backup when it had failed to recruit sufficient staff.

If this was a regular private business, one can’t help feeling it would have been run out of town by now.

Last week G4S lost control of HMP Birmingham, resulting in the most serious prison riots since Strangeways in 1990, with almost 400 inmates so far moved out of the wrecked wings to other jails across England. The riot was only quashed when the government sent in 10 public sector Tornado teams of highly trained officers from around the country. Justice secretary Liz Truss has since announced that G4S will have to foot the bill for the Tornado special squads.

This is the least that G4S, with annual revenue of £6.863bn in 2015, could be expected to do. Yet surely the bigger issue is not whether it pays for the emergency state squad that regained control of HMP Birmingham, but why it is allowed to run five of Britain’s prisons in the first place, if it cannot cope when things go wrong.

It has often been suggested that G4S has been allowed to grow in such an unfettered manner that it has become too big to fail, in a similar way to the world’s major banks. While the British government argued that banks had to be bailed out otherwise the economy would suffer, it appears to believe that G4S has to be bailed out of trouble otherwise the nation’s security is at risk.

What this ultimately means is that G4S, like the banks, can cream off all the easy profit, while taking little of the concomitant risk. Take, for example, the case of HMP Birmingham, formerly known as Winson Green. If it were a truly private sector company, G4S would surely by now be the security firm that used to run some of Britain’s prisons. However, there has been no suggestion that government business with G4S should not continue as normal.

G4S Care and Justice Services assumed responsibility for HMP Birmingham in 2011, winning a contract to run the prison for the following 15 years. HMP Birmingham was the first public sector prison to be transferred into the private sector estate, so it was a big deal in every sense. The most recent annual report by the Independent Monitoring Board stated: “It is the board’s view, echoed by prison staff, that there are insufficient staff numbers to deal with many of the day-to-day situations that occur in a local prison. The board would therefore welcome a review of the level of staffing considered appropriate in the contract, which recognises recent changes in prisoner behaviour and that the prison is not able to guarantee provision of all facilities to all prisoners.”

In other words, G4S and the Ministry of Justice (which awards the contract) were warned that HMP Birmingham risked losing control because there was insufficient staff. And sure enough, within six months of publication there was a riot. To be fair to G4S, the MoJ is also struggling to keep control of its state-run jails, with the prison population at its highest figure ever. This has led to the radical cross-party proposal from two former home secretaries and former deputy prime minister (Ken Clarke, Jacqui Smith and Nick Clegg) that the population be halved to 45,000 because the prisons of England and Wales have become so dangerous.

HMP Birmingham was the third prison riot in six weeks, with a fourth following last night. It is easier to understand why there were disturbances at HMP Swaleside, Lewes and Bedford – the number of officers in state-run prisons was cut by almost one third between 2010 and 2015. However, this is not the case for HMP Birmingham. Staffing levels (however inadequate) were agreed when the contract was won and have remained constant. As so often in the case of G4S, the quality of the staff may be a bigger problem. Adverts on the G4S website states that “no specific previous qualifications or experience are required” for the full-time role of prison custody officer.

Earlier this year G4S had its contract to run Medway Secure Training Centre taken away by the government after allegations of mistreating children and cooking the books when it came to recording restraints. Last September G4S lost its contract to run Rainsbrook STC after prison inspectors graded it inadequate, reporting that some staff behaved “extremely inappropriately” with young people, causing distress and humiliation.

That action was finally taken, but the truth is that for many years allegations of inappropriate behaviour at the G4S-run STCs went unacknowledged, let alone unpunished. Earlier this year, the Guardian revealed that prisons academic Professor John Pitts had written to the Youth Justice Board, the Social Services Inspectorate, the Home Office and G4S itself 13 years ago alleging abuse and bullying by senior staff at Medway STC. Nothing was done about his warnings. For whatever reason, G4S was protected by the state.

The day the Guardian published this story, G4S announced it was to sell its remaining children’s services (which it hasn’t yet done). And again, it looked as if it was being protected. Despite the revelations of bad practice, the company would still be allowed to make a profit from “selling” its children’s services business. Yet, in this case, what business did it own to sell, apart from the buildings in which the children were detained? It made it look as if prisoners were being treated as assets.

In 2011 G4S won the £240m contract to provide security for London’s 2012 Olympics, but then failed to provide enough staff. In July 2012 defence secretary Phillip Hammond announced up to 3,500 British army troops would be deployed to compensate for G4S’s failure. What private company would be able call on such backup? And yes, G4S was penalised (it lost an estimated £88m on its £240m contract) but again, in the context of the £6bn turnover, it was a small price to pay for such a fiasco.

Within two months it had won a £20m five-year deal to manage the tagging of offenders in Scotland, but its tagging contract was again to become the subject of controversy. In 2014 G4S agreed to repay £108.9m after overcharging the UK government on contracts to tag, (including charging for the tagging of people who were dead or in jail) and was barred from bidding for new tagging contracts.

Astonishingly, this September G4S won a contract to run a national anti-discrimination helpline, despite being criticised for its equality and human rights record in the other public services it has delivered (the 2015 Ofsted report on Rainsbrook STC said that children were subjected to “degrading treatment” and “racist comments” by staff).

HMP Birmingham, Medway and Rainsbrook STCs, the Olympics, and we’ve barely scraped the surface of G4S failings. If this were a regular private business, one can’t help feeling it would have been run out of town by now. Instead, it has simultaneously had its knuckles rapped and head patted by the government.

And so it goes on. Massive contracts, huge profits, humiliating exposés, big financial penalties, massive contracts, huge profits …

G4S has, in effect, become an arm of government (many governments), providing the services the state cannot, or does not want to, provide. Yes, it might have to repay tens of millions of pounds and be stripped of individual contracts, but ultimately it has become too big to fail. And when a private company has become too big too fail, it has also become too big to exist.