A major factor in Lothian staying independent was political. Labour was stronger in mainly industrial Lothian than in Tayside or Grampian with their large rural areas, then often Tory.
LRT was able to survive because it never ran at a loss. The Edinburgh Corporation and it's successor; Lothian region never put money into keeping it running. Lots of councils paid for rural and school services out of profitable routes' surpluses.
LRT was formerly a Public Service Department, like a library, or Roads department, governed by the completely different rules that run the public sector. In 1986 it was incorporated under companies law as required by the 1985 Act. City councils still actually owned their companies, but the PTE buses had a different arrangement which was how Westminster/HMG could get its oar in.
Contrast LRT with Portsmouth Citybus which ran at a loss. It continued to run loss making routes at its own expense and lost patronage on its profitable routes. It moved too slowly to survive deregulation so it collapsed and had to be sold off as the Council was barred from bailing it out. I think this was the story in many municipal departments, about 1 in eight.
LRT did a few naughty things in the 80s, like shortening their routes where they lost a bit of money. The council then opened a tender and - oh look, LRTs bid is cheapest! And got paid a small subsidy for those sections. LRT was also shrewd in buying up genuine threats to profit margins and making the ridacard, which meant passengers would actually wait for SMT buses to go past as their fare was paid for. LRT made it through the great filter and is now successful in spite of the council, not because of it.
The other thing differentiating Edinburgh from most cities of its size is the relative lack of urban redevelopment, and incredibly expensive parking - all makes the fare look very reasonable compared to driving.
I think what would have happened if LRT was privatised is that LRT would be another Brighton & Hove, or Trent Barton type story - one of the successes. The geography of Edinburgh is just too good for buses to do badly.