An investigation is underway into how a family of three got infected with coronavirus while in hotel quarantine in Sydney.