In response to energy shortages, an advanced civilization builds a spaceship to foster children.
Children are mass-produced by machines. After birth, they would join a graduation ceremony.
The ceremony is in fact a survival competition.
If they failed to win a spot in the competition before they turn 18, they would become the fuel for the spaceship.