It's not technically a nursery invention, but it's marketed as a way to keep children quiet and entertained for long periods, which is useful for parents and caregivers.
While the Gobstoppers are advertised as lasting forever, this is obviously not true.