These are all very good questions, and very important ones also.
DHHS needs to examine their actions in this case, and make adjustments to the policies that allowed Ayla to slip through the cracks into an unsafe environment. I definitely believe Ayla should have remained with Trista's sister, instead of being placed with an immature father who had never cared for her on a daily basis, and probably knew little to nothing about the demands of raising a toddler.
Ayla was safe in the care of her aunt. Why was she moved to an unfamiliar place to be with a dad she barely knew?
The bio parent will always get first preference according to DHHS. If there is no history with the non-custodial parent, they will give custody to that person. I think the philosophy is that the child will always benefit with their parent over anyone else.