The First Minister insisted that screening of patients always took place to avoid inappropriate transfer and suggested that keeping older people in hospital during a pandemic may not have been "right or proper."
It emerged over the weekend that five health boards transferred 37 patients to care homes around the time that lockdown was put in place in March after they had tested positive.
Opposition parties have called on Lord Advocate James Wolffe to urgently investigate situation.
The First Minister said during today's daily Coronavirus briefing that she expects "lessons to be learned" from the Scottish Government's handling of the pandemic.
But she added: "Care was taken to put guidance in place that was considered to be appropriate at every stage.
"For example, from mid-March that included guidance requiring clinical screening of patients being transferred from hospitals to care homes to guard against inappropriate transfer. It also advised social isolation within care homes."
The cases will have involved older people with no medical need to be in hospital, Ms Sturgeon added.
"Keeping them in hospital, particularly in the phase of a pandemic, would not necessarily have been the right or proper or appropriate thing to do," she said.
The SNP leader accepted that "proper scrutiny" of the response to Covid, including in care homes, is "really essential."
She added: "That scrutiny must include consideration of whether, based on what we knew at each stage, the guidance in place was appropriate and properly implemented.
"That's why we have committed to a public inquiry in due course."
A message from the Editor:
Thank you for reading this story on our website. While I have your attention, I also have an important request to make of you.
The dramatic events of 2020 are having a major impact on many of our advertisers - and consequently the revenue we receive. We are now more reliant than ever on you taking out a digital subscription to support our journalism.
Subscribe to scotsman.com and enjoy unlimited access to Scottish news and information online and on our app. Visit https://www.scotsman.com/subscriptions now to sign up.
By supporting us, we are able to support you in providing trusted, fact-checked content for this website.