Premier Mark McGowan says the lockdown is a necessary measure after two people spent days in the community while infectious.