Within the space of a few weeks, two emerging nations have been rocked by demonstrations on a scale unseen for decades. Both had popular, confident leaders used to winning elections. Both had booming economies and enjoyed an expanding role on the world stage. Both were taken aback by the speed and the catholic nature of demands. Welcome, Turkey and Brazil, to the world of the pop-up protest.

For Dilma Rousseff, a former student radical herself, the revolutionary nature of the protest, the vast crowds that filled Rio's streets, must be especially galling. What had her administration been about – and that of Lula da Silva's before it – if it had not been about pulling millions out of extreme poverty with programmes such as Bolsa Família, the social welfare programme? Like the president of Brazil, the mayor of São Paulo, Fernando Haddad, is a centre-left politician of the Workers' party, who spent the first months of office this year announcing new housing for the low-paid and improvements to the public transport ticket system. What happened? A small demonstration about a rise in bus rides worth all of six pence spirals into a national crisis.

"Stop corruption. Change Brazil"; "Halt evictions"; "Come to the street. It's the only place we don't pay taxes"; "Government failure to understand education will lead to revolution": are the placards unfair or deserved? They may be hard on Ms Rousseff or Mr da Silva personally, but the political class as a whole amply merits the rage it is now reaping. Corruption in their ranks is so endemic that one of Brazil's richest men and former São Paulo mayor, Paulo Maluf, lent his name to it. To "Maluf" is to steal millions from Brazilian taxpayers and to stash it in a secret bank account in Jersey. The 12 stadiums Brazil had to build for the World Cup (publicly funded ones cost several times more than the privately built ones) may have been the spark, but outrage at the way public money is spent is a long-standing grievance. Ms Rousseff and the Fifa president Sepp Blatter were both booed at the opening ceremony of the Confederations Cup, not because Brazilians, of all people, have suddenly turned against football, but because they and some footballers turned against the establishment. Millions see that their hard-earned and heavily taxed money will do little more than line Fifa's pockets, and leave Brazil with a whole herd of white elephants. Brazilians are right to get the feel-bad factor of the coming jamborees – the World Cup and the Olympics. They compare the investments going into the World Cup with those made in health and education. Someone, somewhere forgot to ask them first what they feel about it. Now they know.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.