What did they do before that? According to this website, before automatic pinsetters became standard in the late 1950s, boys were employed "to pick up bowling pins, arrange them in order and return bowling balls to the players."
The website says that the boys were sometimes called "pin monkeys," and that explains why on The Flintstones, real monkeys were shown performing the task in the bowling alley where Fred did his famous twinkle toe ball release.