I agree. The child can grow up with a narrative that the mother was frightened but loved her baby enough to put the child where someone would find him and love him (not quite true, but close enough)
Good Samaritan laws should be well-known to people The mother should've known where she can leave the newborn. There have to be assurances that the parent will not be pursued. Why? The purpose is to support life, so a frightened mother does not choose a late-term abortion or abandonment over the child's life.
The whole concept is about not judging the mother who makes the most important choice, to give life to her child.
I think the mother did fairly well, compared to the cruelty exposed elsewhere. The baby is well, and was left in a fairly safe situation where he was bound to be found. She may have been in a great panic, and not thinking too clearly. Now she, and the baby, can go on in life - and I hope they both see good days.