Monasteries were not orphanages. You could sometimes dump a baby off there (they had deposit bins specifically for that), but they wouldn't raise it. They would usually find somebody else to take care of it.
Monasteries did not have accept older children or adults, either. Children given to the church would often come with money for their care and feeding. The poor would often get turned away.
A monastery could be a safe place to house offspring who didn't have a family who could (publicly) support them. They were also good places for second sons and other spare children, and with enough money donated they could work their way up in the church hierarchy to do the family some good.
But it was a lousy social safety net.