Homeless families and pregnant women have been put up in squalid rooms costing councils £316 per week enough to pay for apartments or family homes.
Official figures show local authorities have breached unsuitable temporary accommodation (UTA) orders 750 times in just 18 months.
The orders are designed to provide better quality housing for families with children and pregnant women, by ensuring they are not living in hostels, hotels and B&Bs for more than seven days.
However, local authorities have flouted the rules repeatedly, with the City of Edinburgh Council accounting for 540 (72 per cent) of the national total breaches for April 2017 to September 2018.
West Lothian has breached the order 120 times in the same period, while Glasgow did so just ten times.
Clackmannanshire was the lowest, with less than four breaches in 18 months.
For the cost of the squalid rooms - £316 per week - penthouse apartments, five-bedroom family homes and luxury flats could be rented out.
Labour MSP for Lothian, Kezia Dugdale, said: “These figures reveal the staggering number of individuals and families in Edinburgh who are more likely than anywhere else in Scotland to be placed into unsuitable temporary accommodation.
“Every year thousands of people, themselves homeless, for a variety of reasons and very often through no fault of their own, are being placed in wholly inadequate accommodation.
“The reality of these breaches often means that families are being crowded into tiny rooms, kitchen facilities are limited, beds and linen are dirty, and in bed and breakfast accommodation residents often face being forced out at 9am and having nowhere else to go until they are allowed back later in the afternoon.”
A report by charity Crisis last year revealed that the majority of people living in temporary homeless accommodation had depression, and three-quarters were unable to have visits from friends or family.
Nearly half had no access to basic facilities such as a kitchen or washing machine.
The charity urged the Government to legislate to ensure nobody would be housed in these conditions for more than seven days, which is currently under consideration.
The City of Edinburgh Council said it has been working hard to reduce the number of UTA breaches they have, but pressures on housing stock mean not enough temporary furnished flats are available for those who need them.
A plan to build an extra 10,000 affordable homes in the next five years is currently under way, but with the city having the most expensive rental rates in the country and a lack of social housing, the problem of homelessness is not easily solved.
Councillor Kate Campbell, Edinburgh’s housing and economy convener, said: “Temporary furnished flats are the most suitable form of accommodation for homeless families, but we don’t always have enough properties available for families when they first present as homeless.
“The difficulty for us is that if we take a social home out of permanent supply to make it a temporary flat we are reducing the number of permanent homes available, meaning it takes longer for homeless families to be permanently housed.
“Instead we’ve been increasing the number of temporary flats from the private sector, so that we can offer households with children a flat more quickly, but without having an impact on the supply of social homes.
“We have a detailed action plan to end the use of temporary accommodation.”
The Scottish Government’s Housing Minister Kevin Stewart said: “While temporary accommodation provides an important safety net in emergency situations, we are clear such arrangements must be for as short a time as possible and we have asked local authorities and their partners to transition to a rapid rehousing approach.
“We recognise some of them face particular challenges in providing appropriate housing for homeless families, which is why we provided an additional £23.5 million for rapid rehousing and Housing First.
“Our Unsuitable Accommodation Order legislation ensures families with children and pregnant women should only stay in accommodation such as B&Bs for a maximum of seven days and I will not tolerate breaches of the order.”