Churches and charities (often religious charities) did place children, yes. Often they ran homes for single mothers and then placed the babies with "suitable" families.
However, children could also be placed informally between members of a family or community, or by contact through advertisement, or by those in charge of a workhouse.
I have two known instances of informal adoption in the 1860s-1880s in my tree.
In one case (Yorkshire) the child of an impoverished young widow was permanently placed with a very distant and childless cousin-by-marriage who lived a long way away. The connection between them took some tracing, so I would be amazed if they knew each other, but first contact was presumably made through the family network.
In another case (London) my ggg grandparents only had one natural child, a son. A few years later they took in an illegitimate girl from the workhouse as a "nurse child" (foster child) and she went on to become a permanent part of the family, described as an adopted daughter. In due course her birth mother had another daughter in the workhouse, and my relatives "adopted" her too.
Do you know where John was born (home, workhouse etc)? Did the Beldham family have other children?