Where and when hotel quarantine is required,14 days has generally been the required duration. I don't know where this figure has come from, I suspect it was the WHO, based on the best available evidence at the time. In Victoria, no testing was initially conducted on those in hotel quarantine (they are now required to be tested, generally at days 3 and 11).
This recent paper from Israel suggests that the duration of covid positivity/infectivity in those that have it ranged from 4 - 45 days (median of 3 weeks):
https://onlinelibrary.wiley.com/doi/10.1002/jmv.26374
I'm sure this factor will be discussed at the upcoming inquiry into the Vic quarantine system, and how it may not have reduced spread of the disease.