Professor Phil Hanlon, director of the Public Health Institute for Scotland, branded the move "a scandal" and the city was urged to reconsider controversial deals with Irn-Bru manufacturer AG Barr and Coca-Cola.
Giving evidence to the parliamentary health committee, Professor Hanlon asked: "How did we get to the circumstance in which a school needs to flog its conscience for a few hundred quid by vending teeth-rotting soft drinks?"
His outburst comes as East Renfrewshire dropped controversial plans to use sponsorship cash from Barrs to refurbish six canteens.
Glasgow receives funding from the same source for seven canteens and Coca-Cola has a deal covering a further 15 schools.
The SNP's Dorothy-Grace Elder, a Glasgow list MSP, described the sponsorship deal as "outrageous". Ms Elder, who sits on the health committee as an independent, also called for sugary drinks and snacks in vending machines to be replaced by healthier options such as bottled water and sandwiches.
She said: "I visited one school in Glasgow where I was told they made pound;450 a week from the vending machines. They said the money raised was used for school activities but at what cost to the children's health? There are calls for a better diet for children but schools are raking in money from selling them sweets and sugary soft drinks."
A city council spokesman said: "We are aware of the sensitivities surrounding vending machines in Glasgow schools and are working on a wide range of healthy options."
A spokeswoman for AG Barr said: "The council's decision was based on research among the children who said they wanted fast food. We are simply giving them a choice and they still have plenty of healthy options available to them."
East Renfrewshire abandoned its scheme after Eastwood High's dining hall was decked out in Irn-Bru colours. A spokesman said it did not want furniture branded with Irn-Bru's logo.
Professor Mike Lean, a nutrition expert at Glasgow University, said many institutions, including schools, made it difficult for young people to have access to drinking water while soft drinks are readily available. "Children need to be provided with drinks and water is the best thing to provide."
Evelyn Borland, acting director of health promotion with Greater Glasgow NHS Board, said: "We share concerns that young people drink large amounts of fizzy drinks. But we have been working with Glasgow City Council to shift the focus away from drinking soft drinks and eating fast food.
"We are trying to promote healthy options and we have a new advertising campaign to encourage children to drink more milk and water and ditch fizzy drinks."