The answer is in the movie. When explaining the Matrix to Neo, Morpheus says: "There are fields, endless fields, where human beings are no longer born, we are grown."
It also refers to a 2D array of numbers in linear algebra. This data structure is used to store the synaptic weights of an artificial neural network.
We have only bits and pieces of information but what we know for certain is that at some point in the early twenty-first century all of mankind was united in celebration. We marveled at our own magnificence as we gave birth to AI.
What if reincarnation? When someone dies in the Matrix, their body gets reconnected to another baby in the Matrix. As for how the human population is maintained outside of the Matrix... either the machines keep catching more humans, or something like artificial insemination. Or cloning
That would actually be a good idea. With people growing up and learning on their own, you don't have a fully controlled system. The world inside the Matrix will be evolving and from time to time there will be some glitch somewhere. If you have a base of defined childhoods, then only physical differences between bodies and random occurences inside are uncontrolled
If I were to construct the Matrix, I would go after cloning (fewer biological lottery) and predefined lifepaths to keep everything nice and stable